From fb9befa3d883250d67b6cec492018c78f89ef2e8 Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Mon, 4 Jun 2018 23:26:01 +0200 Subject: Modifying print function to handle char and int automatically, implementing reade and readc, handling two variables with the same name in different scope => local variable has priority on the global one --- src/generator.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/generator.h') diff --git a/src/generator.h b/src/generator.h index b486172..939ab13 100644 --- a/src/generator.h +++ b/src/generator.h @@ -23,9 +23,12 @@ void gen_function_declaration(const char name[], int return_type, int nb_param); void gen_function_end_declaration(); int gen_function_call(const char name[], int nb_param); void gen_declaration(const char name[], int type, Scope scope); +void gen_check(const char name[], Scope scope); -void gen_read(const char name[], Scope scope); -void gen_print(); +void gen_reade(const char name[]); +void gen_readc(const char name[]); + +void gen_print(int type); void gen_if_label(int idx); void gen_if_start(int idx); -- cgit v1.2.3