stable
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
#include <lib/core.h>
|
||||
#include "frontend.h"
|
||||
#include "parser/symtab/symtab.h"
|
||||
|
||||
ast_node_t* frontend(const char* file, void* stream, sread_fn sread) {
|
||||
ast_node_t* cc_frontend(const char* file, void* stream, sread_fn sread) {
|
||||
init_lib_core();
|
||||
strpool_t strpool;
|
||||
init_strpool(&strpool);
|
||||
|
||||
lexer_t lexer;
|
||||
cc_lexer_t lexer;
|
||||
init_lexer(&lexer, file, stream, sread, &strpool);
|
||||
|
||||
symtab_t symtab;
|
||||
init_symtab(&symtab);
|
||||
// TODO global scope
|
||||
symtab_enter_scope(&symtab);
|
||||
|
||||
parser_t parser;
|
||||
init_parser(&parser, &lexer, &symtab);
|
||||
|
||||
Reference in New Issue
Block a user