sem.h (563B)
1 #pragma once 2 3 #include <libgccjit.h> 4 #include <stdlib.h> 5 6 #include "types.h" 7 8 // Symbol table functions 9 void symbol_add(const char* name, TypeInfo* type); 10 TypeInfo* symbol_get_type(const char* name); 11 Symbol* symbol_find(const char* name); 12 13 // Scope management functions 14 Scope scope_init(Node*); 15 void scope_add_symbol(Scope* scope, const char* name, TypeInfo* type); 16 Symbol* scope_find_symbol(Scope* scope, const char* name); 17 18 // Type checking functions 19 int types_equal(TypeInfo* a, TypeInfo* b); 20 21 void scope_program(Scope*, Ast*); 22 void scope_print(Scope*, Ast*);