Iterator + start to add core to core codegen
This commit is contained in:
@@ -240,6 +240,7 @@ ast_enum(Token *pos, Ast_Expr *typespec, Ast_Scope *scope) {
|
||||
AST_NEW(Decl, ENUM, pos, AST_DECL);
|
||||
result->scope = scope;
|
||||
result->typespec = typespec;
|
||||
if (typespec) set_flag(typespec->flags, AST_TYPESPEC);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -248,6 +249,7 @@ ast_var(Token *pos, Ast_Expr *typespec, Intern_String name, Ast_Expr *expr) {
|
||||
AST_NEW(Decl, VAR, pos, AST_DECL);
|
||||
result->name = name;
|
||||
result->typespec = typespec;
|
||||
if (typespec) set_flag(typespec->flags, AST_TYPESPEC);
|
||||
result->expr = expr;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user