Typecheck completado.
[toypasc.git] / typecheck_visitor.h
blob7856ec6c59c12421a7578846ecdac8e25dafeadc
1 #ifndef TYPECHECK_VISITOR_H
2 #define TYPECHECK_VISITOR_H
4 #include "ast.h"
5 #include "base.h"
6 #include "symbol_table.h"
8 //static bool is_vardecl = FALSE;
9 static Type declared_type = VOID;
10 static Symbol *symtab;
11 static Symbol *global_symtab;
13 Visitor *typecheck_new();
15 void typecheck_visit_program (struct AstNode *node);
16 void typecheck_visit_programdecl (struct AstNode *node);
17 void typecheck_visit_procfunc_list (struct AstNode *node);
18 void typecheck_visit_procfunc(struct AstNode *node);
19 void typecheck_visit_vardecl_list (struct AstNode *node);
20 void typecheck_visit_vardecl (struct AstNode *node);
21 void typecheck_visit_parameter (struct AstNode *node);
22 void typecheck_visit_statement_list(struct AstNode *node);
23 void typecheck_visit_printint_stmt (struct AstNode *node);
24 void typecheck_visit_printchar_stmt (struct AstNode *node);
25 void typecheck_visit_printbool_stmt (struct AstNode *node);
26 void typecheck_visit_printline_stmt (struct AstNode *node);
27 void typecheck_visit_assignment_stmt (struct AstNode *node);
28 void typecheck_visit_if_stmt (struct AstNode *node);
29 void typecheck_visit_while_stmt (struct AstNode *node);
30 void typecheck_visit_for_stmt (struct AstNode *node);
31 void typecheck_visit_binary_expr (struct AstNode *node);
32 void typecheck_visit_notfactor (struct AstNode *node);
33 void typecheck_visit_call (struct AstNode *node);
34 void typecheck_visit_callparam_list (struct AstNode *node);
35 void typecheck_visit_identifier (struct AstNode *node);
37 void typecheck_visit_donothing(struct AstNode *node);
39 #endif // TYPECHECK_VISITOR_H