aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-31 21:05:10 +0100
committerGitHub <[email protected]>2020-07-31 21:05:10 +0100
commit2346a28c638dc8fe945059b68126d268dd7fb690 (patch)
tree4cfe573d8d6c49c3f92f4a56e5fae3af2b37c1a0 /xtask/src/codegen
parent1914d0aa7b5518c743e7403da6d7eea3fe28e955 (diff)
parent8cf19847ddbcbbe1c1bb634dfc4a61ab75ec941d (diff)
Merge #5634
5634: Finish rename r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/rust.ungram28
1 files changed, 24 insertions, 4 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 02f5aa732..aca23890c 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -1,3 +1,7 @@
1//*************************//
2// Names, Paths and Macros //
3//*************************//
4
1Name = 5Name =
2 'ident' 6 'ident'
3 7
@@ -50,6 +54,10 @@ MacroStmts =
50 statements:Stmt* 54 statements:Stmt*
51 Expr? 55 Expr?
52 56
57//*************************//
58// Items //
59//*************************//
60
53SourceFile = 61SourceFile =
54 'shebang'? 62 'shebang'?
55 Attr* 63 Attr*
@@ -245,6 +253,10 @@ Visibility =
245Attr = 253Attr =
246 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' 254 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
247 255
256//****************************//
257// Statements and Expressions //
258//****************************//
259
248Stmt = 260Stmt =
249 ExprStmt 261 ExprStmt
250| Item 262| Item
@@ -347,7 +359,7 @@ IndexExpr =
347 Attr* base:Expr '[' index:Expr ']' 359 Attr* base:Expr '[' index:Expr ']'
348 360
349TupleExpr = 361TupleExpr =
350 Attr* '(' Attr* (Expr (',' Expr)* ','?)? ')' 362 Attr* '(' Attr* fields:(Expr (',' Expr)* ','?)? ')'
351 363
352RecordExpr = 364RecordExpr =
353 Path RecordExprFieldList 365 Path RecordExprFieldList
@@ -434,6 +446,10 @@ AwaitExpr =
434BoxExpr = 446BoxExpr =
435 Attr* 'box' Expr 447 Attr* 'box' Expr
436 448
449//*************************//
450// Types //
451//*************************//
452
437Type = 453Type =
438 ArrayType 454 ArrayType
439| DynTraitType 455| DynTraitType
@@ -495,6 +511,10 @@ TypeBound =
495 'lifetime' 511 'lifetime'
496| '?'? Type 512| '?'? Type
497 513
514//************************//
515// Patterns //
516//************************//
517
498Pat = 518Pat =
499 IdentPat 519 IdentPat
500| BoxPat 520| BoxPat
@@ -540,16 +560,16 @@ RecordPatField =
540 Attr* (NameRef ':')? Pat 560 Attr* (NameRef ':')? Pat
541 561
542TupleStructPat = 562TupleStructPat =
543 Path '(' args:(Pat (',' Pat)* ','?)? ')' 563 Path '(' fields:(Pat (',' Pat)* ','?)? ')'
544 564
545TuplePat = 565TuplePat =
546 '(' args:(Pat (',' Pat)* ','?)? ')' 566 '(' fields:(Pat (',' Pat)* ','?)? ')'
547 567
548ParenPat = 568ParenPat =
549 '(' Pat ')' 569 '(' Pat ')'
550 570
551SlicePat = 571SlicePat =
552 '[' args:(Pat (',' Pat)* ','?)? ']' 572 '[' (Pat (',' Pat)* ','?)? ']'
553 573
554PathPat = 574PathPat =
555 Path 575 Path