aboutsummaryrefslogtreecommitdiff
path: root/src/generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/generator.h')
-rw-r--r--src/generator.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/generator.h b/src/generator.h
index 41a769a..6c132fd 100644
--- a/src/generator.h
+++ b/src/generator.h
@@ -7,6 +7,7 @@
7#define __GENERATOR_H__ 7#define __GENERATOR_H__
8 8
9#include <stdio.h> 9#include <stdio.h>
10#include <stdbool.h>
10#include "symbol_table.h" 11#include "symbol_table.h"
11 12
12typedef enum scope { 13typedef enum scope {
@@ -21,10 +22,13 @@ FILE *output;
21void gen_prologue(); 22void gen_prologue();
22void gen_prologue_continue(int *bss_done); 23void gen_prologue_continue(int *bss_done);
23void gen_const_declaration(); 24void gen_const_declaration();
25void gen_const(const char name[], int value, Scope scope);
26
24Type gen_function_declaration(const char name[], int return_type); 27Type gen_function_declaration(const char name[], int return_type);
25void gen_function_end_declaration(const char name[], int return_type, int nb_param); 28void gen_function_end_declaration(const char name[], int return_type, int nb_param);
26void gen_function_return(Type expect, Type actual); 29void gen_function_return(Type expect, Type actual);
27Type gen_function_call(const char name[], int nb_param); 30Type gen_function_call(const char name[], int nb_param);
31
28void gen_declaration(const char name[], int type, Scope scope); 32void gen_declaration(const char name[], int type, Scope scope);
29void gen_check(const char name[], Scope scope); 33void gen_check(const char name[], Scope scope);
30 34