Finalize WhereClause gramamr

This commit is contained in:
Aleksey Kladov 2020-07-31 15:09:20 +02:00
parent b250ae6c55
commit c04c06c4bc

View file

@ -175,7 +175,13 @@ ConstParam =
('=' default_val:Expr)? ('=' default_val:Expr)?
LifetimeParam = LifetimeParam =
Attr* 'lifetime' Attr* 'lifetime' (':' TypeBoundList?)?
WhereClause =
'where' predicates:(WherePred (',' WherePred)* ','?)
WherePred =
('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
Visibility = Visibility =
'pub' ('(' 'pub' ('('
@ -450,12 +456,6 @@ MacroStmts =
statements:Stmt* statements:Stmt*
Expr? Expr?
WherePred =
('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
WhereClause =
'where' predicates:WherePred*
ExprStmt = ExprStmt =
Attr* Expr ';' Attr* Expr ';'