diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r-- | crates/ra_syntax/src/grammar.ron | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index 26efeeba9..1836862fe 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -158,12 +158,13 @@ Grammar( | |||
158 | "DYN_TRAIT_TYPE", | 158 | "DYN_TRAIT_TYPE", |
159 | 159 | ||
160 | "REF_PAT", | 160 | "REF_PAT", |
161 | "BOX_PAT", | ||
161 | "BIND_PAT", | 162 | "BIND_PAT", |
162 | "PLACEHOLDER_PAT", | 163 | "PLACEHOLDER_PAT", |
163 | "PATH_PAT", | 164 | "PATH_PAT", |
164 | "STRUCT_PAT", | 165 | "RECORD_PAT", |
165 | "FIELD_PAT_LIST", | 166 | "RECORD_FIELD_PAT_LIST", |
166 | "FIELD_PAT", | 167 | "RECORD_FIELD_PAT", |
167 | "TUPLE_STRUCT_PAT", | 168 | "TUPLE_STRUCT_PAT", |
168 | "TUPLE_PAT", | 169 | "TUPLE_PAT", |
169 | "SLICE_PAT", | 170 | "SLICE_PAT", |
@@ -190,9 +191,9 @@ Grammar( | |||
190 | "MATCH_ARM_LIST", | 191 | "MATCH_ARM_LIST", |
191 | "MATCH_ARM", | 192 | "MATCH_ARM", |
192 | "MATCH_GUARD", | 193 | "MATCH_GUARD", |
193 | "STRUCT_LIT", | 194 | "RECORD_LIT", |
194 | "NAMED_FIELD_LIST", | 195 | "RECORD_FIELD_LIST", |
195 | "NAMED_FIELD", | 196 | "RECORD_FIELD", |
196 | "TRY_BLOCK_EXPR", | 197 | "TRY_BLOCK_EXPR", |
197 | "BOX_EXPR", | 198 | "BOX_EXPR", |
198 | 199 | ||
@@ -216,10 +217,10 @@ Grammar( | |||
216 | "EXTERN_BLOCK", | 217 | "EXTERN_BLOCK", |
217 | "EXTERN_ITEM_LIST", | 218 | "EXTERN_ITEM_LIST", |
218 | "ENUM_VARIANT", | 219 | "ENUM_VARIANT", |
219 | "NAMED_FIELD_DEF_LIST", | 220 | "RECORD_FIELD_DEF_LIST", |
220 | "NAMED_FIELD_DEF", | 221 | "RECORD_FIELD_DEF", |
221 | "POS_FIELD_DEF_LIST", | 222 | "TUPLE_FIELD_DEF_LIST", |
222 | "POS_FIELD_DEF", | 223 | "TUPLE_FIELD_DEF", |
223 | "ENUM_VARIANT_LIST", | 224 | "ENUM_VARIANT_LIST", |
224 | "ITEM_LIST", | 225 | "ITEM_LIST", |
225 | "ATTR", | 226 | "ATTR", |
@@ -286,8 +287,8 @@ Grammar( | |||
286 | "DocCommentsOwner" | 287 | "DocCommentsOwner" |
287 | ] | 288 | ] |
288 | ), | 289 | ), |
289 | "NamedFieldDefList": (collections: [("fields", "NamedFieldDef")]), | 290 | "RecordFieldDefList": (collections: [("fields", "RecordFieldDef")]), |
290 | "NamedFieldDef": ( | 291 | "RecordFieldDef": ( |
291 | traits: [ | 292 | traits: [ |
292 | "VisibilityOwner", | 293 | "VisibilityOwner", |
293 | "NameOwner", | 294 | "NameOwner", |
@@ -296,8 +297,8 @@ Grammar( | |||
296 | "TypeAscriptionOwner" | 297 | "TypeAscriptionOwner" |
297 | ] | 298 | ] |
298 | ), | 299 | ), |
299 | "PosFieldDefList": (collections: [("fields", "PosFieldDef")]), | 300 | "TupleFieldDefList": (collections: [("fields", "TupleFieldDef")]), |
300 | "PosFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), | 301 | "TupleFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), |
301 | "EnumDef": ( traits: [ | 302 | "EnumDef": ( traits: [ |
302 | "VisibilityOwner", | 303 | "VisibilityOwner", |
303 | "NameOwner", | 304 | "NameOwner", |
@@ -461,12 +462,12 @@ Grammar( | |||
461 | traits: [ "AttrsOwner" ] | 462 | traits: [ "AttrsOwner" ] |
462 | ), | 463 | ), |
463 | "MatchGuard": (options: ["Expr"]), | 464 | "MatchGuard": (options: ["Expr"]), |
464 | "StructLit": (options: ["Path", "NamedFieldList"]), | 465 | "RecordLit": (options: ["Path", "RecordFieldList"]), |
465 | "NamedFieldList": ( | 466 | "RecordFieldList": ( |
466 | collections: [ ("fields", "NamedField") ], | 467 | collections: [ ("fields", "RecordField") ], |
467 | options: [["spread", "Expr"]] | 468 | options: [["spread", "Expr"]] |
468 | ), | 469 | ), |
469 | "NamedField": (options: ["NameRef", "Expr"]), | 470 | "RecordField": (options: ["NameRef", "Expr"]), |
470 | "CallExpr": ( | 471 | "CallExpr": ( |
471 | traits: ["ArgListOwner"], | 472 | traits: ["ArgListOwner"], |
472 | options: [ "Expr" ], | 473 | options: [ "Expr" ], |
@@ -504,7 +505,7 @@ Grammar( | |||
504 | "BlockExpr", | 505 | "BlockExpr", |
505 | "ReturnExpr", | 506 | "ReturnExpr", |
506 | "MatchExpr", | 507 | "MatchExpr", |
507 | "StructLit", | 508 | "RecordLit", |
508 | "CallExpr", | 509 | "CallExpr", |
509 | "IndexExpr", | 510 | "IndexExpr", |
510 | "MethodCallExpr", | 511 | "MethodCallExpr", |
@@ -523,20 +524,21 @@ Grammar( | |||
523 | ), | 524 | ), |
524 | 525 | ||
525 | "RefPat": ( options: [ "Pat" ]), | 526 | "RefPat": ( options: [ "Pat" ]), |
527 | "BoxPat": ( options: [ "Pat" ]), | ||
526 | "BindPat": ( | 528 | "BindPat": ( |
527 | options: [ "Pat" ], | 529 | options: [ "Pat" ], |
528 | traits: ["NameOwner"] | 530 | traits: ["NameOwner"] |
529 | ), | 531 | ), |
530 | "PlaceholderPat": (), | 532 | "PlaceholderPat": (), |
531 | "PathPat": ( options: [ "Path" ] ), | 533 | "PathPat": ( options: [ "Path" ] ), |
532 | "StructPat": ( options: ["FieldPatList", "Path"] ), | 534 | "RecordPat": ( options: ["RecordFieldPatList", "Path"] ), |
533 | "FieldPatList": ( | 535 | "RecordFieldPatList": ( |
534 | collections: [ | 536 | collections: [ |
535 | ("field_pats", "FieldPat"), | 537 | ("record_field_pats", "RecordFieldPat"), |
536 | ("bind_pats", "BindPat"), | 538 | ("bind_pats", "BindPat"), |
537 | ] | 539 | ] |
538 | ), | 540 | ), |
539 | "FieldPat": ( | 541 | "RecordFieldPat": ( |
540 | traits: ["NameOwner"], | 542 | traits: ["NameOwner"], |
541 | options: ["Pat"] | 543 | options: ["Pat"] |
542 | ), | 544 | ), |
@@ -552,10 +554,11 @@ Grammar( | |||
552 | "Pat": ( | 554 | "Pat": ( |
553 | enum: [ | 555 | enum: [ |
554 | "RefPat", | 556 | "RefPat", |
557 | "BoxPat", | ||
555 | "BindPat", | 558 | "BindPat", |
556 | "PlaceholderPat", | 559 | "PlaceholderPat", |
557 | "PathPat", | 560 | "PathPat", |
558 | "StructPat", | 561 | "RecordPat", |
559 | "TupleStructPat", | 562 | "TupleStructPat", |
560 | "TuplePat", | 563 | "TuplePat", |
561 | "SlicePat", | 564 | "SlicePat", |