Compile string, working on scopes
This commit is contained in:
11
new_ast.cpp
11
new_ast.cpp
@@ -35,6 +35,8 @@ struct Parse_Ctx:Lexer{
|
||||
Token empty_token;
|
||||
S64 indent;
|
||||
|
||||
String_Builder gen;
|
||||
|
||||
Intern_String intern(String string){
|
||||
return intern_string(&interns, string);
|
||||
}
|
||||
@@ -43,6 +45,7 @@ struct Parse_Ctx:Lexer{
|
||||
perm = perm_allocator;
|
||||
heap = heap_allocator;
|
||||
|
||||
gen = {perm};
|
||||
resolved = {heap};
|
||||
syms = {heap};
|
||||
type_map = {heap};
|
||||
@@ -202,10 +205,10 @@ function Ast_Typespec *ast_typespec_name(Token *pos, Intern_String name);
|
||||
//-----------------------------------------------------------------------------
|
||||
// AST Constructors beginning with expressions
|
||||
//-----------------------------------------------------------------------------
|
||||
#define AST_NEW(T,ikind,ipos) \
|
||||
Ast_##T *result = exp_alloc_type(pctx->perm, Ast_##T); \
|
||||
result->kind = ikind; \
|
||||
result->pos = ipos; \
|
||||
#define AST_NEW(T,ikind,ipos) \
|
||||
Ast_##T *result = exp_alloc_type(pctx->perm, Ast_##T, AF_ZeroMemory);\
|
||||
result->kind = ikind; \
|
||||
result->pos = ipos; \
|
||||
result->id = ++pctx->unique_ids
|
||||
|
||||
function Ast_Atom *
|
||||
|
||||
Reference in New Issue
Block a user