diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index e3b9032a0..4bcff4e14 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -261,18 +261,20 @@ Grammar( | |||
261 | "TypeParamsOwner", | 261 | "TypeParamsOwner", |
262 | "AttrsOwner", | 262 | "AttrsOwner", |
263 | "DocCommentsOwner" | 263 | "DocCommentsOwner" |
264 | ], | ||
265 | collections: [ | ||
266 | ["fields", "NamedFieldDef"] | ||
267 | ] | 264 | ] |
268 | ), | 265 | ), |
269 | "NamedFieldDef": ( traits: ["NameOwner", "AttrsOwner"] ), | 266 | "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), |
267 | "NamedFieldDef": ( traits: ["NameOwner", "AttrsOwner"], options: ["TypeRef"] ), | ||
268 | "PosFieldList": (collections: [["fields", "PosField"]]), | ||
269 | "PosField": ( traits: ["AttrsOwner"], options: ["TypeRef"]), | ||
270 | "EnumDef": ( traits: [ | 270 | "EnumDef": ( traits: [ |
271 | "NameOwner", | 271 | "NameOwner", |
272 | "TypeParamsOwner", | 272 | "TypeParamsOwner", |
273 | "AttrsOwner", | 273 | "AttrsOwner", |
274 | "DocCommentsOwner" | 274 | "DocCommentsOwner" |
275 | ] ), | 275 | ], options: [["variant_list", "EnumVariantList"]] ), |
276 | "EnumVariantList": ( collections: [["variants", "EnumVariant"]] ), | ||
277 | "EnumVariant": ( traits: ["NameOwner"], options: ["Expr"] ), | ||
276 | "TraitDef": ( traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner"] ), | 278 | "TraitDef": ( traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner"] ), |
277 | "Module": ( | 279 | "Module": ( |
278 | traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner" ], | 280 | traits: ["NameOwner", "AttrsOwner", "DocCommentsOwner" ], |
@@ -301,17 +303,17 @@ Grammar( | |||
301 | ] ), | 303 | ] ), |
302 | "ImplItem": (), | 304 | "ImplItem": (), |
303 | 305 | ||
304 | "ParenType": (), | 306 | "ParenType": (options: ["TypeRef"]), |
305 | "TupleType": (), | 307 | "TupleType": ( collections: [["fields", "TypeRef"]] ), |
306 | "NeverType": (), | 308 | "NeverType": (), |
307 | "PathType": (options: ["Path"]), | 309 | "PathType": (options: ["Path"]), |
308 | "PointerType": (), | 310 | "PointerType": (options: ["TypeRef"]), |
309 | "ArrayType": (), | 311 | "ArrayType": ( options: ["TypeRef", "Expr"] ), |
310 | "SliceType": (), | 312 | "SliceType": ( options: ["TypeRef"] ), |
311 | "ReferenceType": (), | 313 | "ReferenceType": (options: ["TypeRef"]), |
312 | "PlaceholderType": (), | 314 | "PlaceholderType": (), |
313 | "FnPointerType": (), | 315 | "FnPointerType": (options: ["ParamList", "RetType"]), |
314 | "ForType": (), | 316 | "ForType": (options: ["TypeRef"]), |
315 | "ImplTraitType": (), | 317 | "ImplTraitType": (), |
316 | "DynTraitType": (), | 318 | "DynTraitType": (), |
317 | 319 | ||
@@ -392,19 +394,19 @@ Grammar( | |||
392 | collections: [ [ "pats", "Pat" ] ] | 394 | collections: [ [ "pats", "Pat" ] ] |
393 | ), | 395 | ), |
394 | "MatchGuard": (), | 396 | "MatchGuard": (), |
395 | "StructLit": (), | 397 | "StructLit": (options: ["Path", "NamedFieldList"]), |
396 | "NamedFieldList": (), | 398 | "NamedFieldList": (collections: [ ["fields", "NamedField"] ]), |
397 | "NamedField": (), | 399 | "NamedField": (options: ["NameRef", "Expr"]), |
398 | "CallExpr": ( | 400 | "CallExpr": ( |
399 | traits: ["ArgListOwner"], | 401 | traits: ["ArgListOwner"], |
400 | options: [ "Expr" ], | 402 | options: [ "Expr" ], |
401 | ), | 403 | ), |
402 | "MethodCallExpr": ( | 404 | "MethodCallExpr": ( |
403 | traits: ["ArgListOwner"], | 405 | traits: ["ArgListOwner"], |
404 | options: [ "Expr" ], | 406 | options: [ "Expr", "NameRef" ], |
405 | ), | 407 | ), |
406 | "IndexExpr": (), | 408 | "IndexExpr": (), |
407 | "FieldExpr": (), | 409 | "FieldExpr": (options: ["Expr", "NameRef"]), |
408 | "TryExpr": (options: ["Expr"]), | 410 | "TryExpr": (options: ["Expr"]), |
409 | "CastExpr": (options: ["Expr", "TypeRef"]), | 411 | "CastExpr": (options: ["Expr", "TypeRef"]), |
410 | "RefExpr": (options: ["Expr"]), | 412 | "RefExpr": (options: ["Expr"]), |