aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-31 14:29:34 +0100
committerGitHub <[email protected]>2020-07-31 14:29:34 +0100
commit3407d6f8a430627be333c32cb4cef02c0c8d11e3 (patch)
tree7673b208208c0beed142d55ab202d7397ae72d29 /xtask/src
parent84bf0240941b645ef9f8c57b81db30659f7c68e4 (diff)
parent4d38b0dce1884dab0da7394ccc979eef0a21076c (diff)
Merge #5622
5622: Finalize WhereClause gramamr r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/rust.ungram36
1 files changed, 18 insertions, 18 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index 32f2808ea..8271509cf 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -175,7 +175,13 @@ ConstParam =
175 ('=' default_val:Expr)? 175 ('=' default_val:Expr)?
176 176
177LifetimeParam = 177LifetimeParam =
178 Attr* 'lifetime' 178 Attr* 'lifetime' (':' TypeBoundList?)?
179
180WhereClause =
181 'where' predicates:(WherePred (',' WherePred)* ','?)
182
183WherePred =
184 ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
179 185
180Visibility = 186Visibility =
181 'pub' ('(' 187 'pub' ('('
@@ -188,6 +194,17 @@ Visibility =
188Attr = 194Attr =
189 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' 195 '#' '!'? '[' Path ('=' Literal | TokenTree)? ']'
190 196
197Stmt =
198 LetStmt
199| ExprStmt
200
201LetStmt =
202 Attr* 'let' Pat (':' Type)?
203 '=' initializer:Expr ';'
204
205ExprStmt =
206 Attr* Expr ';'?
207
191Type = 208Type =
192 ParenType 209 ParenType
193| TupleType 210| TupleType
@@ -450,19 +467,6 @@ MacroStmts =
450 statements:Stmt* 467 statements:Stmt*
451 Expr? 468 Expr?
452 469
453WherePred =
454 ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
455
456WhereClause =
457 'where' predicates:WherePred*
458
459ExprStmt =
460 Attr* Expr ';'
461
462LetStmt =
463 Attr* 'let' Pat (':' Type)
464 '=' initializer:Expr ';'
465
466Path = 470Path =
467 (qualifier:Path '::')? segment:PathSegment 471 (qualifier:Path '::')? segment:PathSegment
468 472
@@ -490,10 +494,6 @@ LifetimeArg =
490ConstArg = 494ConstArg =
491 Literal | BlockExpr BlockExpr 495 Literal | BlockExpr BlockExpr
492 496
493Stmt =
494 LetStmt
495| ExprStmt
496
497Pat = 497Pat =
498 OrPat 498 OrPat
499| ParenPat 499| ParenPat