aboutsummaryrefslogtreecommitdiff
path: root/src/parser.hpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-09-08 12:12:41 +0100
committergingerBill <bill@gingerbill.org>2019-09-08 12:12:41 +0100
commit4afc78efc682152a9b096781a1598fd1841ca938 (patch)
tree9aecfa8070f2e26c73ce00fe95e6651a5175a77f /src/parser.hpp
parentd54255505a1b7b2a460ce7f4a18ea30a92286aa1 (diff)
Add `where` clauses to `struct` and `union`
Diffstat (limited to 'src/parser.hpp')
-rw-r--r--src/parser.hpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/parser.hpp b/src/parser.hpp
index 3da2551f1..419cf9da3 100644
--- a/src/parser.hpp
+++ b/src/parser.hpp
@@ -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; \