Add where clauses to struct and union

This commit is contained in:
gingerBill
2019-09-08 12:12:41 +01:00
parent d54255505a
commit 4afc78efc6
8 changed files with 125 additions and 61 deletions
+16 -12
View File
@@ -491,20 +491,24 @@ AST_KIND(_TypeBegin, "", bool) \
Ast *elem; \
}) \
AST_KIND(StructType, "struct type", struct { \
Token token; \
Array<Ast *> fields; \
isize field_count; \
Ast *polymorphic_params; \
Ast *align; \
bool is_packed; \
bool is_raw_union; \
Token token; \
Array<Ast *> fields; \
isize field_count; \
Ast *polymorphic_params; \
Ast *align; \
Token where_token; \
Array<Ast *> where_clauses; \
bool is_packed; \
bool is_raw_union; \
}) \
AST_KIND(UnionType, "union type", struct { \
Token token; \
Array<Ast *> variants; \
Ast *polymorphic_params; \
Ast * align; \
bool no_nil; \
Token token; \
Array<Ast *> variants; \
Ast *polymorphic_params; \
Ast * align; \
bool no_nil; \
Token where_token; \
Array<Ast *> where_clauses; \
}) \
AST_KIND(EnumType, "enum type", struct { \
Token token; \