This commit is contained in:
Krzosa Karol
2022-05-31 22:52:56 +02:00
parent 7ea0dfc7a6
commit 98d2389c9f
5 changed files with 119 additions and 152 deletions

View File

@@ -271,22 +271,22 @@ struct Ast_Package:Ast{
result->id = ++pctx->unique_ids
function Ast_Atom *
ast_str(Token *pos, Intern_String string, Ast_Flag flags = 0){
AST_NEW(Atom, STR, pos, AST_ATOM | flags);
ast_str(Token *pos, Intern_String string){
AST_NEW(Atom, STR, pos, AST_ATOM | AST_EXPR);
result->intern_val = string;
return result;
}
function Ast_Atom *
ast_ident(Token *pos, Intern_String string, Ast_Flag flags = 0){
AST_NEW(Atom, IDENT, pos, AST_ATOM | flags);
ast_ident(Token *pos, Intern_String string){
AST_NEW(Atom, IDENT, pos, AST_ATOM | AST_EXPR);
result->intern_val = string;
return result;
}
function Ast_Atom *
ast_int(Token *pos, S64 integer, Ast_Flag flags = 0){
AST_NEW(Atom, INT, pos, AST_ATOM | flags);
ast_int(Token *pos, S64 integer){
AST_NEW(Atom, INT, pos, AST_ATOM | AST_EXPR);
result->int_val = integer;
return result;
}