Parsing union
This commit is contained in:
@@ -214,8 +214,10 @@ finalize_stmt_scope(Ast_Scope *scope) {
|
||||
}
|
||||
|
||||
CORE_Static Ast_Decl *
|
||||
ast_struct(Token *pos, Ast_Scope *scope) {
|
||||
ast_struct(Token *pos, Ast_Scope *scope, Ast_Kind kind = AST_STRUCT) {
|
||||
assert(kind == AST_STRUCT || kind == AST_UNION);
|
||||
AST_NEW(Decl, STRUCT, pos, AST_DECL | AST_AGGREGATE);
|
||||
result->kind = kind;
|
||||
result->scope = scope;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user