feat add func call and rewrite codes

This commit is contained in:
ZZY
2025-03-07 12:29:53 +08:00
parent 09299e339c
commit 95bf44eb3f
37 changed files with 3369 additions and 1063 deletions

View File

@@ -3,13 +3,13 @@
#include "frontend.h"
struct ASTNode* frontend(const char* file, void* stream, sread_fn sread) {
struct Lexer lexer;
lexer_t lexer;
init_lexer(&lexer, file, stream, sread);
struct SymbolTable symtab;
symtab_t symtab;
init_symtab(&symtab);
struct Parser parser;
parser_t parser;
init_parser(&parser, &lexer, &symtab);
parse_prog(&parser);