From 337ca2a847e6c5f7555c90807f13412c349b753f Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 8 May 2018 22:51:11 +0200 Subject: Extract generators and reformat grammar --- src/generator.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/generator.h') 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); void gen_if_end(int idx); void gen_ifelse_end(int idx); -void gen_assign(int ident, Scope scope); +int gen_assign(const char ident[], Scope scope); void gen_or(int left, int right, int idx); void gen_and(int left, int right, int idx); 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); void gen_addsub(char op, int left, int right); void gen_divstar(char op, int left, int right); +int gen_signed_expr(char op, int type); +int gen_negate_expr(int type); +int gen_value(const char ident[], Scope scope); +int gen_num(int value, Scope scope); +int gen_char(int value, Scope scope); + #endif -- cgit v1.2.3