Begin work adding bit_field

This commit is contained in:
gingerBill
2024-02-22 15:55:54 +00:00
parent b12ba1508e
commit a4b8c1ea17
16 changed files with 535 additions and 2 deletions
+15
View File
@@ -650,6 +650,13 @@ AST_KIND(_DeclEnd, "", bool) \
CommentGroup * docs; \
CommentGroup * comment; \
}) \
AST_KIND(BitFieldField, "bit field field", struct { \
Ast * name; \
Ast * type; \
Ast * bit_size; \
CommentGroup *docs; \
CommentGroup *comment; \
}) \
AST_KIND(FieldList, "field list", struct { \
Token token; \
Slice<Ast *> list; \
@@ -742,6 +749,14 @@ AST_KIND(_TypeBegin, "", bool) \
Ast * elem; \
Ast * underlying; \
}) \
AST_KIND(BitFieldType, "bit field type", struct { \
Scope *scope; \
Token token; \
Ast * backing_type; \
Token open; \
Slice<Ast *> fields; /* BitFieldField */ \
Token close; \
}) \
AST_KIND(MapType, "map type", struct { \
Token token; \
Ast *count; \