From aa16ecbb7e3a3dbd9ecc5c3d5e12f7c96a41974f Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Wed, 6 Jun 2018 01:23:00 +0200 Subject: Array management --- src/generator.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/generator.h') diff --git a/src/generator.h b/src/generator.h index d2ad5c2..20a83f9 100644 --- a/src/generator.h +++ b/src/generator.h @@ -20,6 +20,7 @@ void gen_const_declaration(); void gen_const(const char name[], int value, Scope scope); Type gen_function_declaration(const char name[], int return_type); +void gen_tab_declaration(const char name[], Scope scope, int size); void gen_function_end_declaration(const char name[], int return_type, int nb_param); void gen_function_return(Type expect, Type actual); Type gen_function_call(const char name[], int nb_param); @@ -38,6 +39,8 @@ void gen_if_end(int idx); void gen_ifelse_end(int idx); int gen_assign(const char ident[], Scope scope); +int gen_assign_tab(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); @@ -48,6 +51,8 @@ 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_value_tab(const char ident[], Scope scope); + int gen_num(int value, Scope scope); int gen_char(int value, Scope scope); -- cgit v1.2.3