aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam NAILI2018-06-05 14:57:17 +0200
committerAdam NAILI2018-06-05 14:57:17 +0200
commit4b53a522a626d2597f7a90c16b2aa16acbc62e6a (patch)
tree205702b5eb5cb36747e234cbd8a8310cf2f49374 /src
parent0255cca32a78847d2de0134740b991a77f5ad555 (diff)
parent13b4fc0a1e32008f125f73148d01f12bdac3a80e (diff)
downloadtpc-compiler-4b53a522a626d2597f7a90c16b2aa16acbc62e6a.tar.gz
Merge
Diffstat (limited to 'src')
-rw-r--r--src/generator.c2
-rw-r--r--src/generator.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/generator.c b/src/generator.c
index 1181ac7..bf187e0 100644
--- a/src/generator.c
+++ b/src/generator.c
@@ -110,7 +110,7 @@ void gen_function_return(Type expect, Type actual) {
110 gen_function_end_declaration(); 110 gen_function_end_declaration();
111} 111}
112 112
113int gen_function_call(const char name[], int nb_param) { 113Type gen_function_call(const char name[], int nb_param) {
114 Type return_type = fun_lookup(name, nb_param); 114 Type return_type = fun_lookup(name, nb_param);
115 fprintf(output, "call %s\n", name); 115 fprintf(output, "call %s\n", name);
116 if (return_type != VOID_T) fprintf(output, "push rax\n"); 116 if (return_type != VOID_T) fprintf(output, "push rax\n");
diff --git a/src/generator.h b/src/generator.h
index 1f586c1..082e359 100644
--- a/src/generator.h
+++ b/src/generator.h
@@ -24,7 +24,7 @@ void gen_const_declaration();
24Type gen_function_declaration(const char name[], int return_type, int nb_param); 24Type gen_function_declaration(const char name[], int return_type, int nb_param);
25void gen_function_end_declaration(); 25void gen_function_end_declaration();
26void gen_function_return(Type expect, Type actual); 26void gen_function_return(Type expect, Type actual);
27int gen_function_call(const char name[], int nb_param); 27Type gen_function_call(const char name[], int nb_param);
28void gen_declaration(const char name[], int type, Scope scope); 28void gen_declaration(const char name[], int type, Scope scope);
29void gen_check(const char name[], Scope scope); 29void gen_check(const char name[], Scope scope);
30 30