summaryrefslogtreecommitdiff
path: root/src/ast/ast.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/ast.hpp')
-rw-r--r--src/ast/ast.hpp59
1 files changed, 22 insertions, 37 deletions
diff --git a/src/ast/ast.hpp b/src/ast/ast.hpp
index 886766ff..fd72552a 100644
--- a/src/ast/ast.hpp
+++ b/src/ast/ast.hpp
@@ -227,15 +227,15 @@ public:
TAGGED_UNION_EX(EnumVariantData, (: public Serialisable), Value,
(
- (Value, (
+ (Value, struct {
::AST::Expr m_value;
- )),
- (Tuple, (
+ }),
+ (Tuple, struct {
::std::vector<TypeRef> m_sub_types;
- )),
- (Struct, (
+ }),
+ (Struct, struct {
::std::vector<StructItem> m_fields;
- ))
+ })
),
(), (),
(
@@ -319,12 +319,12 @@ public:
TAGGED_UNION_EX(StructData, (: public Serialisable), Struct,
(
- (Tuple, (
+ (Tuple, struct {
::std::vector<TupleItem> ents;
- )),
- (Struct, (
+ }),
+ (Struct, struct {
::std::vector<StructItem> ents;
- ))
+ })
),
(),(),
(
@@ -593,34 +593,19 @@ private:
TAGGED_UNION_EX(Item, (: public Serialisable), None,
(
- (None, (
- )),
- (Module, (
- Module e;
- )),
- (Crate, (
+ (None, struct {} ),
+ (Module, Module),
+ (Crate, struct {
::std::string name;
- )),
-
- (Type, (
- TypeAlias e;
- )),
- (Struct, (
- Struct e;
- )),
- (Enum, (
- Enum e;
- )),
- (Trait, (
- Trait e;
- )),
-
- (Function, (
- Function e;
- )),
- (Static, (
- Static e;
- ))
+ }),
+
+ (Type, TypeAlias),
+ (Struct, Struct),
+ (Enum, Enum),
+ (Trait, Trait),
+
+ (Function, Function),
+ (Static, Static)
),
(, attrs(mv$(x.attrs))), (attrs = mv$(x.attrs);),