It is now able to compile int foo1; correctly

This commit is contained in:
Jeremiah Orians 2018-08-11 06:47:12 -04:00
parent 3862dc6b7b
commit 25a340dd7c
No known key found for this signature in database
GPG Key ID: 7457821534D2ACCD
1 changed files with 12 additions and 1 deletions

View File

@ -491,8 +491,19 @@ NOP
:sym_declare
RET R15
;; emit function
;; Recieves struct char* in R0, struct token_list* in R1
;; R13 Holds pointer to global_token, R14 is HEAP Pointer
;; Returns struct token_list* in R0
:emit
COPY R0 R1
PUSHR R2 R15 ; Protect R2
COPY R2 R14 ; Pointer to T
ADDUI R14 R14 20 ; CALLOC struct token_list
STORE32 R1 R2 0 ; T->NEXT = HEAD
STORE32 R0 R2 8 ; T->S = S
MOVE R0 R2 ; Put T in proper spot for return
POPR R2 R15 ; Restore R2
RET R15
;; file_print function