diff options
author | pacien | 2018-05-08 22:51:11 +0200 |
---|---|---|
committer | pacien | 2018-05-08 22:51:11 +0200 |
commit | 337ca2a847e6c5f7555c90807f13412c349b753f (patch) | |
tree | e4fa5378be47b0b80a66f14a19ec0fcc6accce17 /src/generator.h | |
parent | 5732ffaa722bda7c5957324e79e61ad8f3811e2f (diff) | |
download | tpc-compiler-337ca2a847e6c5f7555c90807f13412c349b753f.tar.gz |
Extract generators and reformat grammar
Diffstat (limited to 'src/generator.h')
-rw-r--r-- | src/generator.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/generator.h b/src/generator.h index 17ea662..c907f66 100644 --- a/src/generator.h +++ b/src/generator.h | |||
@@ -23,7 +23,7 @@ void gen_if_start(int idx); | |||
23 | void gen_if_end(int idx); | 23 | void gen_if_end(int idx); |
24 | void gen_ifelse_end(int idx); | 24 | void gen_ifelse_end(int idx); |
25 | 25 | ||
26 | void gen_assign(int ident, Scope scope); | 26 | int gen_assign(const char ident[], Scope scope); |
27 | void gen_or(int left, int right, int idx); | 27 | void gen_or(int left, int right, int idx); |
28 | void gen_and(int left, int right, int idx); | 28 | void gen_and(int left, int right, int idx); |
29 | void gen_eq(const char op[], int left, int right, int idx); | 29 | void gen_eq(const char op[], int left, int right, int idx); |
@@ -31,4 +31,10 @@ void gen_order(const char op[], int left, int right, int idx); | |||
31 | void gen_addsub(char op, int left, int right); | 31 | void gen_addsub(char op, int left, int right); |
32 | void gen_divstar(char op, int left, int right); | 32 | void gen_divstar(char op, int left, int right); |
33 | 33 | ||
34 | int gen_signed_expr(char op, int type); | ||
35 | int gen_negate_expr(int type); | ||
36 | int gen_value(const char ident[], Scope scope); | ||
37 | int gen_num(int value, Scope scope); | ||
38 | int gen_char(int value, Scope scope); | ||
39 | |||
34 | #endif | 40 | #endif |