diff options
Diffstat (limited to 'xtask/src')
-rw-r--r-- | xtask/src/codegen/rust.ungram | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index bc1dd6761..13ad67ca1 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram | |||
@@ -1,3 +1,33 @@ | |||
1 | Path = | ||
2 | (qualifier:Path '::')? segment:PathSegment | ||
3 | |||
4 | PathSegment = | ||
5 | '::' | 'crate' | 'self' | 'super' | ||
6 | | (NameRef ('::'? TypeArgList)?) | ||
7 | | NameRef ParamList RetType? | ||
8 | | '<' PathType ('as' PathType)? '>' | ||
9 | |||
10 | TypeArgList = | ||
11 | '::'? '<' | ||
12 | TypeArg* | ||
13 | LifetimeArg* | ||
14 | AssocTypeArg* | ||
15 | ConstArg* | ||
16 | '>' | ||
17 | |||
18 | TypeArg = | ||
19 | Type | ||
20 | |||
21 | AssocTypeArg = | ||
22 | NameRef (':' TypeBoundList | '=' Type) | ||
23 | |||
24 | LifetimeArg = | ||
25 | 'lifetime' | ||
26 | |||
27 | ConstArg = | ||
28 | Literal | BlockExpr BlockExpr | ||
29 | |||
30 | |||
1 | SourceFile = | 31 | SourceFile = |
2 | 'shebang'? | 32 | 'shebang'? |
3 | Attr* | 33 | Attr* |
@@ -521,33 +551,6 @@ MacroStmts = | |||
521 | statements:Stmt* | 551 | statements:Stmt* |
522 | Expr? | 552 | Expr? |
523 | 553 | ||
524 | Path = | ||
525 | (qualifier:Path '::')? segment:PathSegment | ||
526 | |||
527 | PathSegment = | ||
528 | '::' | 'crate' | 'self' | 'super' | ||
529 | | '<' NameRef TypeArgList ParamList RetType PathType '>' | ||
530 | |||
531 | TypeArgList = | ||
532 | '::'? '<' | ||
533 | TypeArg* | ||
534 | LifetimeArg* | ||
535 | AssocTypeArg* | ||
536 | ConstArg* | ||
537 | '>' | ||
538 | |||
539 | TypeArg = | ||
540 | Type | ||
541 | |||
542 | AssocTypeArg = | ||
543 | NameRef (':' TypeBoundList | '=' Type) | ||
544 | |||
545 | LifetimeArg = | ||
546 | 'lifetime' | ||
547 | |||
548 | ConstArg = | ||
549 | Literal | BlockExpr BlockExpr | ||
550 | |||
551 | Pat = | 554 | Pat = |
552 | OrPat | 555 | OrPat |
553 | | ParenPat | 556 | | ParenPat |