diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/generator.c | 2 | ||||
-rw-r--r-- | src/tpc.y | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/generator.c b/src/generator.c index d5df545..1181ac7 100644 --- a/src/generator.c +++ b/src/generator.c | |||
@@ -97,7 +97,7 @@ Type gen_function_declaration(const char name[], int return_type, int nb_param) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | void gen_function_end_declaration() { | 99 | void gen_function_end_declaration() { |
100 | fprintf(output, "mov rsp, rbp\npop rbp\nret\n"); | 100 | fprintf(output, "mov rsp, rbp\npop rbp\nret\n"); |
101 | } | 101 | } |
102 | 102 | ||
103 | void gen_function_return(Type expect, Type actual) { | 103 | void gen_function_return(Type expect, Type actual) { |
@@ -164,7 +164,7 @@ F: | |||
164 | | LValue { $$ = gen_value($<ident>1, scope); } | 164 | | LValue { $$ = gen_value($<ident>1, scope); } |
165 | | NUM { $$ = gen_num($1, scope); } | 165 | | NUM { $$ = gen_num($1, scope); } |
166 | | CARACTERE { $$ = gen_char($1, scope); } | 166 | | CARACTERE { $$ = gen_char($1, scope); } |
167 | | IDENT '(' Arguments ')' { return_type = fun_lookup($<ident>1,$<num>3);$$ = gen_function_call($<ident>1,$<num>3); } | 167 | | IDENT '(' Arguments ')' { $$ = gen_function_call($<ident>1,$<num>3); } |
168 | ; | 168 | ; |
169 | LValue: | 169 | LValue: |
170 | IDENT { gen_check($<ident>1, scope); } | 170 | IDENT { gen_check($<ident>1, scope); } |