aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar.ron
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar.ron')
-rw-r--r--crates/ra_syntax/src/grammar.ron44
1 files changed, 32 insertions, 12 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index c7acbbd6c..b7a2d1c01 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -271,7 +271,15 @@ Grammar(
271 ] 271 ]
272 ), 272 ),
273 "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), 273 "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]),
274 "NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner"], options: ["TypeRef"] ), 274 "NamedFieldDef": (
275 traits: [
276 "VisibilityOwner",
277 "NameOwner",
278 "AttrsOwner",
279 "DocCommentsOwner",
280 "TypeAscriptionOwner"
281 ]
282 ),
275 "PosFieldDefList": (collections: [["fields", "PosFieldDef"]]), 283 "PosFieldDefList": (collections: [["fields", "PosFieldDef"]]),
276 "PosFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), 284 "PosFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]),
277 "EnumDef": ( traits: [ 285 "EnumDef": ( traits: [
@@ -298,9 +306,9 @@ Grammar(
298 "NameOwner", 306 "NameOwner",
299 "TypeParamsOwner", 307 "TypeParamsOwner",
300 "AttrsOwner", 308 "AttrsOwner",
301 "DocCommentsOwner" 309 "DocCommentsOwner",
310 "TypeAscriptionOwner",
302 ], 311 ],
303 options: ["TypeRef"]
304 ), 312 ),
305 "StaticDef": ( 313 "StaticDef": (
306 traits: [ 314 traits: [
@@ -308,9 +316,9 @@ Grammar(
308 "NameOwner", 316 "NameOwner",
309 "TypeParamsOwner", 317 "TypeParamsOwner",
310 "AttrsOwner", 318 "AttrsOwner",
311 "DocCommentsOwner" 319 "DocCommentsOwner",
320 "TypeAscriptionOwner",
312 ], 321 ],
313 options: ["TypeRef"]
314 ), 322 ),
315 "TypeAliasDef": ( 323 "TypeAliasDef": (
316 traits: [ 324 traits: [
@@ -569,11 +577,15 @@ Grammar(
569 "ExprStmt": ( 577 "ExprStmt": (
570 options: [ ["expr", "Expr"] ] 578 options: [ ["expr", "Expr"] ]
571 ), 579 ),
572 "LetStmt": ( options: [ 580 "LetStmt": (
573 ["pat", "Pat"], 581 options: [
574 ["type_ref", "TypeRef"], 582 ["pat", "Pat"],
575 ["initializer", "Expr"], 583 ["initializer", "Expr"],
576 ]), 584 ],
585 traits: [
586 "TypeAscriptionOwner",
587 ]
588 ),
577 "Condition": ( 589 "Condition": (
578 options: [ "Pat", "Expr" ] 590 options: [ "Pat", "Expr" ]
579 ), 591 ),
@@ -595,10 +607,18 @@ Grammar(
595 ["params", "Param"] 607 ["params", "Param"]
596 ] 608 ]
597 ), 609 ),
598 "SelfParam": (options: ["TypeRef", "SelfKw"]), 610 "SelfParam": (
611 options: ["SelfKw"],
612 traits: [
613 "TypeAscriptionOwner",
614 ]
615 ),
599 "SelfKw": (), 616 "SelfKw": (),
600 "Param": ( 617 "Param": (
601 options: [ "Pat", "TypeRef" ], 618 options: [ "Pat" ],
619 traits: [
620 "TypeAscriptionOwner",
621 ]
602 ), 622 ),
603 "UseItem": ( 623 "UseItem": (
604 traits: ["AttrsOwner"], 624 traits: ["AttrsOwner"],