Core: Add Ast_Label
This commit is contained in:
@@ -177,6 +177,15 @@ ast_return(Token *pos, Ast_Expr *expr) {
|
||||
return result;
|
||||
}
|
||||
|
||||
CORE_Static Ast_Label *
|
||||
ast_label(Token *pos, Intern_String name, Ast_Scope *scope, bool enable_goto) {
|
||||
Ast_Label *result = ast_new(Ast_Label, AST_LABEL, pos, AST_STMT | AST_DECL);
|
||||
result->enable_goto = enable_goto;
|
||||
result->name = name;
|
||||
result->scope = scope;
|
||||
return result;
|
||||
}
|
||||
|
||||
CORE_Static Ast_If_Node *
|
||||
ast_if_node(Token *pos, Ast_Expr *init, Ast_Expr *expr, Ast_Scope *scope) {
|
||||
AST_NEW(If_Node, IF_NODE, pos, AST_STMT);
|
||||
|
||||
Reference in New Issue
Block a user