aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar.ron
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar.ron')
-rw-r--r--crates/libsyntax2/src/grammar.ron36
1 files changed, 29 insertions, 7 deletions
diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron
index f3c3d3036..c9e128462 100644
--- a/crates/libsyntax2/src/grammar.ron
+++ b/crates/libsyntax2/src/grammar.ron
@@ -162,9 +162,10 @@ Grammar(
162 "PATH_EXPR", 162 "PATH_EXPR",
163 "LAMBDA_EXPR", 163 "LAMBDA_EXPR",
164 "IF_EXPR", 164 "IF_EXPR",
165 "WHILE_EXPR",
166 "CONDITION",
165 "LOOP_EXPR", 167 "LOOP_EXPR",
166 "FOR_EXPR", 168 "FOR_EXPR",
167 "WHILE_EXPR",
168 "CONTINUE_EXPR", 169 "CONTINUE_EXPR",
169 "BREAK_EXPR", 170 "BREAK_EXPR",
170 "LABEL", 171 "LABEL",
@@ -336,14 +337,27 @@ Grammar(
336 "ParenExpr": (), 337 "ParenExpr": (),
337 "PathExpr": (), 338 "PathExpr": (),
338 "LambdaExpr": (), 339 "LambdaExpr": (),
339 "IfExpr": (), 340 "IfExpr": (
340 "LoopExpr": (), 341 options: [ ["condition", "Condition"] ]
341 "ForExpr": (), 342 ),
342 "WhileExpr": (), 343 "LoopExpr": (
344 options: [ ["body", "Block"] ]
345 ),
346 "ForExpr": (
347 options: [ ["body", "Block"] ]
348 ),
349 "WhileExpr": (
350 options: [
351 ["condition", "Condition"],
352 ["body", "Block"],
353 ]
354 ),
343 "ContinueExpr": (), 355 "ContinueExpr": (),
344 "BreakExpr": (), 356 "BreakExpr": (),
345 "Label": (), 357 "Label": (),
346 "BlockExpr": (), 358 "BlockExpr": (
359 options: [ ["block", "Block"] ]
360 ),
347 "ReturnExpr": (), 361 "ReturnExpr": (),
348 "MatchExpr": (), 362 "MatchExpr": (),
349 "MatchArmList": (), 363 "MatchArmList": (),
@@ -432,11 +446,19 @@ Grammar(
432 "TypeParamList": ( collections: [ ["type_params", "TypeParam" ] ]), 446 "TypeParamList": ( collections: [ ["type_params", "TypeParam" ] ]),
433 "TypeParam": ( traits: ["NameOwner"] ), 447 "TypeParam": ( traits: ["NameOwner"] ),
434 "WhereClause": (), 448 "WhereClause": (),
435 "ExprStmt": (), 449 "ExprStmt": (
450 options: [ ["expr", "Expr"] ]
451 ),
436 "LetStmt": ( options: [ 452 "LetStmt": ( options: [
437 ["pat", "Pat"], 453 ["pat", "Pat"],
438 ["initializer", "Expr"], 454 ["initializer", "Expr"],
439 ]), 455 ]),
456 "Condition": (
457 options: [
458 [ "pat", "Pat" ],
459 [ "expr", "Expr" ],
460 ]
461 ),
440 "Stmt": ( 462 "Stmt": (
441 enum: ["ExprStmt", "LetStmt"], 463 enum: ["ExprStmt", "LetStmt"],
442 ), 464 ),