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.ron78
1 files changed, 40 insertions, 38 deletions
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index ad6d74162..0a35e25d5 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -243,6 +243,8 @@ Grammar(
243 "PARAM", 243 "PARAM",
244 "SELF_PARAM", 244 "SELF_PARAM",
245 "ARG_LIST", 245 "ARG_LIST",
246 "TYPE_BOUND",
247 "TYPE_BOUND_LIST",
246 ], 248 ],
247 ast: { 249 ast: {
248 "SourceFile": ( 250 "SourceFile": (
@@ -293,7 +295,7 @@ Grammar(
293 "EnumVariantList": ( collections: [["variants", "EnumVariant"]] ), 295 "EnumVariantList": ( collections: [["variants", "EnumVariant"]] ),
294 "EnumVariant": ( traits: ["NameOwner", "DocCommentsOwner", "AttrsOwner"], options: ["Expr"] ), 296 "EnumVariant": ( traits: ["NameOwner", "DocCommentsOwner", "AttrsOwner"], options: ["Expr"] ),
295 "TraitDef": ( 297 "TraitDef": (
296 traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner"], 298 traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner", "TypeBoundsOwner"],
297 options: ["ItemList"] 299 options: ["ItemList"]
298 ), 300 ),
299 "Module": ( 301 "Module": (
@@ -313,6 +315,7 @@ Grammar(
313 "DocCommentsOwner", 315 "DocCommentsOwner",
314 "TypeAscriptionOwner", 316 "TypeAscriptionOwner",
315 ], 317 ],
318 options: [ ["body","Expr"]],
316 ), 319 ),
317 "StaticDef": ( 320 "StaticDef": (
318 traits: [ 321 traits: [
@@ -323,6 +326,7 @@ Grammar(
323 "DocCommentsOwner", 326 "DocCommentsOwner",
324 "TypeAscriptionOwner", 327 "TypeAscriptionOwner",
325 ], 328 ],
329 options: [ ["body","Expr"]],
326 ), 330 ),
327 "TypeAliasDef": ( 331 "TypeAliasDef": (
328 traits: [ 332 traits: [
@@ -330,7 +334,8 @@ Grammar(
330 "NameOwner", 334 "NameOwner",
331 "TypeParamsOwner", 335 "TypeParamsOwner",
332 "AttrsOwner", 336 "AttrsOwner",
333 "DocCommentsOwner" 337 "DocCommentsOwner",
338 "TypeBoundsOwner",
334 ], 339 ],
335 options: ["TypeRef"] 340 options: ["TypeRef"]
336 ), 341 ),
@@ -347,8 +352,12 @@ Grammar(
347 "PlaceholderType": (), 352 "PlaceholderType": (),
348 "FnPointerType": (options: ["ParamList", "RetType"]), 353 "FnPointerType": (options: ["ParamList", "RetType"]),
349 "ForType": (options: ["TypeRef"]), 354 "ForType": (options: ["TypeRef"]),
350 "ImplTraitType": (), 355 "ImplTraitType": (
351 "DynTraitType": (), 356 traits: ["TypeBoundsOwner"],
357 ),
358 "DynTraitType": (
359 traits: ["TypeBoundsOwner"],
360 ),
352 361
353 "TypeRef": ( enum: [ 362 "TypeRef": ( enum: [
354 "ParenType", 363 "ParenType",
@@ -456,31 +465,7 @@ Grammar(
456 "RangeExpr": (), 465 "RangeExpr": (),
457 "BinExpr": (), 466 "BinExpr": (),
458 467
459 "IntNumber": ( traits: ["AstToken"] ), 468 "Literal": (),
460 "FloatNumber": ( traits: ["AstToken"] ),
461 "String": ( traits: ["AstToken"] ),
462 "RawString": ( traits: ["AstToken"] ),
463 "Byte": ( traits: ["AstToken"] ),
464 "RawByteString": ( traits: ["AstToken"] ),
465 "ByteString": ( traits: ["AstToken"] ),
466 "Char": ( traits: ["AstToken"] ),
467 "TrueKw": ( traits: ["AstToken"] ),
468 "FalseKw": ( traits: ["AstToken"] ),
469 "LiteralExpr": (
470 enum: [
471 "String",
472 "ByteString",
473 "RawString",
474 "RawByteString",
475 "Char",
476 "Byte",
477 "IntNumber",
478 "FloatNumber",
479 "TrueKw",
480 "FalseKw",
481 ]
482 ),
483 "Literal": (options: ["LiteralExpr"]),
484 469
485 "Expr": ( 470 "Expr": (
486 enum: [ 471 enum: [
@@ -511,6 +496,7 @@ Grammar(
511 "RangeExpr", 496 "RangeExpr",
512 "BinExpr", 497 "BinExpr",
513 "Literal", 498 "Literal",
499 "MacroCall",
514 ], 500 ],
515 ), 501 ),
516 502
@@ -571,13 +557,33 @@ Grammar(
571 ["lifetime_params", "LifetimeParam" ], 557 ["lifetime_params", "LifetimeParam" ],
572 ] 558 ]
573 ), 559 ),
574 "TypeParam": ( traits: ["NameOwner", "AttrsOwner"] ), 560 "TypeParam": ( traits: ["NameOwner", "AttrsOwner", "TypeBoundsOwner"] ),
575 "LifetimeParam": ( 561 "LifetimeParam": (
576 options: [ "Lifetime"],
577 traits: ["AttrsOwner"], 562 traits: ["AttrsOwner"],
578 ), 563 ),
579 "Lifetime": ( traits: ["AstToken"] ), 564 "TypeBound": (
580 "WhereClause": (), 565 options: [
566 "TypeRef",
567 ]
568 ),
569 "TypeBoundList": (
570 collections: [
571 ["bounds", "TypeBound"],
572 ]
573 ),
574 "WherePred": (
575 options: [
576 "TypeRef",
577 ],
578 traits: [
579 "TypeBoundsOwner",
580 ],
581 ),
582 "WhereClause": (
583 collections: [
584 ["predicates", "WherePred"],
585 ],
586 ),
581 "ExprStmt": ( 587 "ExprStmt": (
582 options: [ ["expr", "Expr"] ] 588 options: [ ["expr", "Expr"] ]
583 ), 589 ),
@@ -612,12 +618,10 @@ Grammar(
612 ] 618 ]
613 ), 619 ),
614 "SelfParam": ( 620 "SelfParam": (
615 options: ["SelfKw"],
616 traits: [ 621 traits: [
617 "TypeAscriptionOwner", 622 "TypeAscriptionOwner",
618 ] 623 ]
619 ), 624 ),
620 "SelfKw": (),
621 "Param": ( 625 "Param": (
622 options: [ "Pat" ], 626 options: [ "Pat" ],
623 traits: [ 627 traits: [
@@ -661,8 +665,6 @@ Grammar(
661 ]), 665 ]),
662 "TypeArg": (options: ["TypeRef"]), 666 "TypeArg": (options: ["TypeRef"]),
663 "AssocTypeArg": (options: ["NameRef", "TypeRef"]), 667 "AssocTypeArg": (options: ["NameRef", "TypeRef"]),
664 "LifetimeArg": (options: ["Lifetime"]), 668 "LifetimeArg": (),
665 "Comment": ( traits: ["AstToken"] ),
666 "Whitespace": ( traits: ["AstToken"] ),
667 }, 669 },
668) 670)