diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar.ron')
-rw-r--r-- | crates/libsyntax2/src/grammar.ron | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index da18da8a9..77730e306 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron | |||
@@ -250,11 +250,7 @@ Grammar( | |||
250 | "TypeParamsOwner", | 250 | "TypeParamsOwner", |
251 | "AttrsOwner", | 251 | "AttrsOwner", |
252 | ], | 252 | ], |
253 | options: [ | 253 | options: [ "ParamList", ["body", "Block"], "RetType" ], |
254 | ["param_list", "ParamList"], | ||
255 | ["body", "Block"], | ||
256 | ["ret_type", "RetType"] | ||
257 | ], | ||
258 | ), | 254 | ), |
259 | "RetType": (), | 255 | "RetType": (), |
260 | "StructDef": ( | 256 | "StructDef": ( |
@@ -346,12 +342,12 @@ Grammar( | |||
346 | "PathExpr": (), | 342 | "PathExpr": (), |
347 | "LambdaExpr": ( | 343 | "LambdaExpr": ( |
348 | options: [ | 344 | options: [ |
349 | ["param_list", "ParamList"], | 345 | "ParamList", |
350 | ["body", "Expr"], | 346 | ["body", "Expr"], |
351 | ] | 347 | ] |
352 | ), | 348 | ), |
353 | "IfExpr": ( | 349 | "IfExpr": ( |
354 | options: [ ["condition", "Condition"] ] | 350 | options: [ "Condition" ] |
355 | ), | 351 | ), |
356 | "LoopExpr": ( | 352 | "LoopExpr": ( |
357 | traits: ["LoopBodyOwner"], | 353 | traits: ["LoopBodyOwner"], |
@@ -359,21 +355,19 @@ Grammar( | |||
359 | "ForExpr": ( | 355 | "ForExpr": ( |
360 | traits: ["LoopBodyOwner"], | 356 | traits: ["LoopBodyOwner"], |
361 | options: [ | 357 | options: [ |
362 | ["pat", "Pat"], | 358 | "Pat", |
363 | ["iterable", "Expr"], | 359 | ["iterable", "Expr"], |
364 | ] | 360 | ] |
365 | ), | 361 | ), |
366 | "WhileExpr": ( | 362 | "WhileExpr": ( |
367 | traits: ["LoopBodyOwner"], | 363 | traits: ["LoopBodyOwner"], |
368 | options: [ | 364 | options: [ "Condition" ] |
369 | ["condition", "Condition"], | ||
370 | ] | ||
371 | ), | 365 | ), |
372 | "ContinueExpr": (), | 366 | "ContinueExpr": (), |
373 | "BreakExpr": (), | 367 | "BreakExpr": (), |
374 | "Label": (), | 368 | "Label": (), |
375 | "BlockExpr": ( | 369 | "BlockExpr": ( |
376 | options: [ ["block", "Block"] ] | 370 | options: [ "Block" ] |
377 | ), | 371 | ), |
378 | "ReturnExpr": (), | 372 | "ReturnExpr": (), |
379 | "MatchExpr": (), | 373 | "MatchExpr": (), |
@@ -384,10 +378,7 @@ Grammar( | |||
384 | "NamedFieldList": (), | 378 | "NamedFieldList": (), |
385 | "NamedField": (), | 379 | "NamedField": (), |
386 | "CallExpr": ( | 380 | "CallExpr": ( |
387 | options: [ | 381 | options: [ "Expr", "ArgList" ] |
388 | [ "expr", "Expr" ], | ||
389 | [ "arg_list", "ArgList" ], | ||
390 | ] | ||
391 | ), | 382 | ), |
392 | "IndexExpr": (), | 383 | "IndexExpr": (), |
393 | "MethodCallExpr": (), | 384 | "MethodCallExpr": (), |
@@ -474,7 +465,7 @@ Grammar( | |||
474 | ] | 465 | ] |
475 | ), | 466 | ), |
476 | "TypeParam": ( traits: ["NameOwner"] ), | 467 | "TypeParam": ( traits: ["NameOwner"] ), |
477 | "LifetimeParam": ( options: [ ["lifetime", "Lifetime"] ] ), | 468 | "LifetimeParam": ( options: [ "Lifetime" ] ), |
478 | "Lifetime": (), | 469 | "Lifetime": (), |
479 | "WhereClause": (), | 470 | "WhereClause": (), |
480 | "ExprStmt": ( | 471 | "ExprStmt": ( |
@@ -485,16 +476,13 @@ Grammar( | |||
485 | ["initializer", "Expr"], | 476 | ["initializer", "Expr"], |
486 | ]), | 477 | ]), |
487 | "Condition": ( | 478 | "Condition": ( |
488 | options: [ | 479 | options: [ "Pat", "Expr" ] |
489 | [ "pat", "Pat" ], | ||
490 | [ "expr", "Expr" ], | ||
491 | ] | ||
492 | ), | 480 | ), |
493 | "Stmt": ( | 481 | "Stmt": ( |
494 | enum: ["ExprStmt", "LetStmt"], | 482 | enum: ["ExprStmt", "LetStmt"], |
495 | ), | 483 | ), |
496 | "Block": ( | 484 | "Block": ( |
497 | options: [["expr", "Expr"]], | 485 | options: [ "Expr" ], |
498 | collections: [ | 486 | collections: [ |
499 | ["statements", "Stmt"], | 487 | ["statements", "Stmt"], |
500 | ] | 488 | ] |
@@ -505,16 +493,13 @@ Grammar( | |||
505 | ] | 493 | ] |
506 | ), | 494 | ), |
507 | "Param": ( | 495 | "Param": ( |
508 | options: [["pat", "Pat"]], | 496 | options: [ "Pat" ], |
509 | ), | 497 | ), |
510 | "UseItem": ( | 498 | "UseItem": ( |
511 | options: [["use_tree", "UseTree"]] | 499 | options: [ "UseTree" ] |
512 | ), | 500 | ), |
513 | "UseTree": ( | 501 | "UseTree": ( |
514 | options: [ | 502 | options: [ "Path", "UseTreeList" ] |
515 | ["path", "Path"], | ||
516 | ["use_tree_list", "UseTreeList"], | ||
517 | ] | ||
518 | ), | 503 | ), |
519 | "UseTreeList": ( | 504 | "UseTreeList": ( |
520 | collections: [["use_trees", "UseTree"]] | 505 | collections: [["use_trees", "UseTree"]] |
@@ -531,9 +516,7 @@ Grammar( | |||
531 | ] | 516 | ] |
532 | ), | 517 | ), |
533 | "PathSegment": ( | 518 | "PathSegment": ( |
534 | options: [ | 519 | options: [ "NameRef" ] |
535 | ["name_ref", "NameRef"] | ||
536 | ] | ||
537 | ), | 520 | ), |
538 | }, | 521 | }, |
539 | ) | 522 | ) |