diff options
Diffstat (limited to 'xtask/src/ast_src.rs')
-rw-r--r-- | xtask/src/ast_src.rs | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 3a58217c4..56e3f4b0a 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -93,19 +93,19 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
93 | ], | 93 | ], |
94 | nodes: &[ | 94 | nodes: &[ |
95 | "SOURCE_FILE", | 95 | "SOURCE_FILE", |
96 | "STRUCT_DEF", | 96 | "STRUCT", |
97 | "UNION_DEF", | 97 | "UNION", |
98 | "ENUM_DEF", | 98 | "ENUM", |
99 | "FN_DEF", | 99 | "FN", |
100 | "RET_TYPE", | 100 | "RET_TYPE", |
101 | "EXTERN_CRATE", | 101 | "EXTERN_CRATE", |
102 | "MODULE", | 102 | "MODULE", |
103 | "USE", | 103 | "USE", |
104 | "STATIC_DEF", | 104 | "STATIC", |
105 | "CONST_DEF", | 105 | "CONST", |
106 | "TRAIT_DEF", | 106 | "TRAIT_DEF", |
107 | "IMPL_DEF", | 107 | "IMPL_DEF", |
108 | "TYPE_ALIAS_DEF", | 108 | "TYPE_ALIAS", |
109 | "MACRO_CALL", | 109 | "MACRO_CALL", |
110 | "TOKEN_TREE", | 110 | "TOKEN_TREE", |
111 | "MACRO_DEF", | 111 | "MACRO_DEF", |
@@ -159,9 +159,9 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
159 | "MATCH_ARM_LIST", | 159 | "MATCH_ARM_LIST", |
160 | "MATCH_ARM", | 160 | "MATCH_ARM", |
161 | "MATCH_GUARD", | 161 | "MATCH_GUARD", |
162 | "RECORD_LIT", | 162 | "RECORD_EXPR", |
163 | "RECORD_FIELD_LIST", | 163 | "RECORD_EXPR_FIELD_LIST", |
164 | "RECORD_FIELD", | 164 | "RECORD_EXPR_FIELD", |
165 | "EFFECT_EXPR", | 165 | "EFFECT_EXPR", |
166 | "BOX_EXPR", | 166 | "BOX_EXPR", |
167 | // postfix | 167 | // postfix |
@@ -179,12 +179,12 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
179 | "BIN_EXPR", | 179 | "BIN_EXPR", |
180 | "EXTERN_BLOCK", | 180 | "EXTERN_BLOCK", |
181 | "EXTERN_ITEM_LIST", | 181 | "EXTERN_ITEM_LIST", |
182 | "ENUM_VARIANT", | 182 | "VARIANT", |
183 | "RECORD_FIELD_DEF_LIST", | 183 | "RECORD_FIELD_LIST", |
184 | "RECORD_FIELD_DEF", | 184 | "RECORD_FIELD", |
185 | "TUPLE_FIELD_DEF_LIST", | 185 | "TUPLE_FIELD_LIST", |
186 | "TUPLE_FIELD_DEF", | 186 | "TUPLE_FIELD", |
187 | "ENUM_VARIANT_LIST", | 187 | "VARIANT_LIST", |
188 | "ITEM_LIST", | 188 | "ITEM_LIST", |
189 | "ASSOC_ITEM_LIST", | 189 | "ASSOC_ITEM_LIST", |
190 | "ATTR", | 190 | "ATTR", |
@@ -203,7 +203,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
203 | "NAME_REF", | 203 | "NAME_REF", |
204 | "LET_STMT", | 204 | "LET_STMT", |
205 | "EXPR_STMT", | 205 | "EXPR_STMT", |
206 | "TYPE_PARAM_LIST", | 206 | "GENERIC_PARAM_LIST", |
207 | "LIFETIME_PARAM", | 207 | "LIFETIME_PARAM", |
208 | "TYPE_PARAM", | 208 | "TYPE_PARAM", |
209 | "CONST_PARAM", | 209 | "CONST_PARAM", |
@@ -242,14 +242,13 @@ pub(crate) struct AstNodeSrc { | |||
242 | #[derive(Debug, Eq, PartialEq)] | 242 | #[derive(Debug, Eq, PartialEq)] |
243 | pub(crate) enum Field { | 243 | pub(crate) enum Field { |
244 | Token(String), | 244 | Token(String), |
245 | Node { name: String, src: FieldSrc }, | 245 | Node { name: String, ty: String, cardinality: Cardinality }, |
246 | } | 246 | } |
247 | 247 | ||
248 | #[derive(Debug, Eq, PartialEq)] | 248 | #[derive(Debug, Eq, PartialEq)] |
249 | pub(crate) enum FieldSrc { | 249 | pub(crate) enum Cardinality { |
250 | Shorthand, | 250 | Optional, |
251 | Optional(String), | 251 | Many, |
252 | Many(String), | ||
253 | } | 252 | } |
254 | 253 | ||
255 | #[derive(Debug)] | 254 | #[derive(Debug)] |