diff options
author | pacien | 2018-06-05 22:41:15 +0200 |
---|---|---|
committer | pacien | 2018-06-05 22:41:15 +0200 |
commit | 0f4b1600983f8afda41a02fec07424338785d81d (patch) | |
tree | cd1a3b2f599f7242c9fe76f9d66ca95ba58e34c0 /src/generator.h | |
parent | 864653f00dff0a8a1f37d8e9a732c1da8309a930 (diff) | |
download | tpc-compiler-0f4b1600983f8afda41a02fec07424338785d81d.tar.gz |
Prevent assigning to const
Diffstat (limited to 'src/generator.h')
-rw-r--r-- | src/generator.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/generator.h b/src/generator.h index 6c132fd..d2ad5c2 100644 --- a/src/generator.h +++ b/src/generator.h | |||
@@ -10,11 +10,6 @@ | |||
10 | #include <stdbool.h> | 10 | #include <stdbool.h> |
11 | #include "symbol_table.h" | 11 | #include "symbol_table.h" |
12 | 12 | ||
13 | typedef enum scope { | ||
14 | GLOBAL, | ||
15 | LOCAL | ||
16 | } Scope; | ||
17 | |||
18 | extern int nb_globals; | 13 | extern int nb_globals; |
19 | extern int lineno; | 14 | extern int lineno; |
20 | FILE *output; | 15 | FILE *output; |
@@ -32,8 +27,8 @@ Type gen_function_call(const char name[], int nb_param); | |||
32 | void gen_declaration(const char name[], int type, Scope scope); | 27 | void gen_declaration(const char name[], int type, Scope scope); |
33 | void gen_check(const char name[], Scope scope); | 28 | void gen_check(const char name[], Scope scope); |
34 | 29 | ||
35 | void gen_reade(const char name[]); | 30 | void gen_reade(const char name[], Scope scope); |
36 | void gen_readc(const char name[]); | 31 | void gen_readc(const char name[], Scope scope); |
37 | 32 | ||
38 | void gen_print(int type); | 33 | void gen_print(int type); |
39 | 34 | ||