aboutsummaryrefslogtreecommitdiff
path: root/src/generator.h
diff options
context:
space:
mode:
authorpacien2018-05-08 22:51:11 +0200
committerpacien2018-05-08 22:51:11 +0200
commit337ca2a847e6c5f7555c90807f13412c349b753f (patch)
treee4fa5378be47b0b80a66f14a19ec0fcc6accce17 /src/generator.h
parent5732ffaa722bda7c5957324e79e61ad8f3811e2f (diff)
downloadtpc-compiler-337ca2a847e6c5f7555c90807f13412c349b753f.tar.gz
Extract generators and reformat grammar
Diffstat (limited to 'src/generator.h')
-rw-r--r--src/generator.h8
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);
23void gen_if_end(int idx); 23void gen_if_end(int idx);
24void gen_ifelse_end(int idx); 24void gen_ifelse_end(int idx);
25 25
26void gen_assign(int ident, Scope scope); 26int gen_assign(const char ident[], Scope scope);
27void gen_or(int left, int right, int idx); 27void gen_or(int left, int right, int idx);
28void gen_and(int left, int right, int idx); 28void gen_and(int left, int right, int idx);
29void gen_eq(const char op[], int left, int right, int idx); 29void 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);
31void gen_addsub(char op, int left, int right); 31void gen_addsub(char op, int left, int right);
32void gen_divstar(char op, int left, int right); 32void gen_divstar(char op, int left, int right);
33 33
34int gen_signed_expr(char op, int type);
35int gen_negate_expr(int type);
36int gen_value(const char ident[], Scope scope);
37int gen_num(int value, Scope scope);
38int gen_char(int value, Scope scope);
39
34#endif 40#endif