aboutsummaryrefslogtreecommitdiff
path: root/src/generator.h
diff options
context:
space:
mode:
authorAdam NAILI2018-06-04 23:26:01 +0200
committerAdam NAILI2018-06-04 23:26:01 +0200
commitfb9befa3d883250d67b6cec492018c78f89ef2e8 (patch)
treede82edd1e6129389e5fe70331685eb617fb982f7 /src/generator.h
parentb8f7e7b6843c2bff778ce3c74e355a03e7565499 (diff)
downloadtpc-compiler-fb9befa3d883250d67b6cec492018c78f89ef2e8.tar.gz
Modifying print function to handle char and int automatically, implementing reade and readc, handling two variables with the same name in different scope => local variable has priority on the global one
Diffstat (limited to 'src/generator.h')
-rw-r--r--src/generator.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/generator.h b/src/generator.h
index b486172..939ab13 100644
--- a/src/generator.h
+++ b/src/generator.h
@@ -23,9 +23,12 @@ void gen_function_declaration(const char name[], int return_type, int nb_param);
23void gen_function_end_declaration(); 23void gen_function_end_declaration();
24int gen_function_call(const char name[], int nb_param); 24int gen_function_call(const char name[], int nb_param);
25void gen_declaration(const char name[], int type, Scope scope); 25void gen_declaration(const char name[], int type, Scope scope);
26void gen_check(const char name[], Scope scope);
26 27
27void gen_read(const char name[], Scope scope); 28void gen_reade(const char name[]);
28void gen_print(); 29void gen_readc(const char name[]);
30
31void gen_print(int type);
29 32
30void gen_if_label(int idx); 33void gen_if_label(int idx);
31void gen_if_start(int idx); 34void gen_if_start(int idx);