Finalize TypeBound grammar

This commit is contained in:
Aleksey Kladov 2020-07-31 15:01:18 +02:00
parent a6527ed92c
commit b250ae6c55
4 changed files with 35 additions and 54 deletions

View file

@ -242,6 +242,13 @@ ImplTraitType =
DynTraitType =
'dyn' TypeBoundList
TypeBoundList =
bounds:(TypeBound ('+' TypeBound)* '+'?)
TypeBound =
'lifetime'
| '?'? Type
TupleExpr =
Attr* '(' Expr* ')'
@ -443,12 +450,6 @@ MacroStmts =
statements:Stmt*
Expr?
TypeBound =
'lifetime' | 'const'? Type
TypeBoundList =
bounds:TypeBound*
WherePred =
('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList