diff options
author | Adam NAILI | 2018-06-04 23:26:01 +0200 |
---|---|---|
committer | Adam NAILI | 2018-06-04 23:26:01 +0200 |
commit | fb9befa3d883250d67b6cec492018c78f89ef2e8 (patch) | |
tree | de82edd1e6129389e5fe70331685eb617fb982f7 /src/generator.h | |
parent | b8f7e7b6843c2bff778ce3c74e355a03e7565499 (diff) | |
download | tpc-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.h | 7 |
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); | |||
23 | void gen_function_end_declaration(); | 23 | void gen_function_end_declaration(); |
24 | int gen_function_call(const char name[], int nb_param); | 24 | int gen_function_call(const char name[], int nb_param); |
25 | void gen_declaration(const char name[], int type, Scope scope); | 25 | void gen_declaration(const char name[], int type, Scope scope); |
26 | void gen_check(const char name[], Scope scope); | ||
26 | 27 | ||
27 | void gen_read(const char name[], Scope scope); | 28 | void gen_reade(const char name[]); |
28 | void gen_print(); | 29 | void gen_readc(const char name[]); |
30 | |||
31 | void gen_print(int type); | ||
29 | 32 | ||
30 | void gen_if_label(int idx); | 33 | void gen_if_label(int idx); |
31 | void gen_if_start(int idx); | 34 | void gen_if_start(int idx); |