Fix GenericArgs grammar

This commit is contained in:
Aleksey Kladov 2020-07-31 18:41:37 +02:00
parent d21b5db891
commit 040b4c800d
4 changed files with 107 additions and 50 deletions

View file

@ -8,12 +8,13 @@ PathSegment =
| '<' PathType ('as' PathType)? '>'
GenericArgList =
'::'? '<'
TypeArg*
LifetimeArg*
AssocTypeArg*
ConstArg*
'>'
'::'? '<' (GenericArg (',' GenericArg)* ','?)? '>'
GenericArg =
TypeArg
| AssocTypeArg
| LifetimeArg
| ConstArg
TypeArg =
Type
@ -27,7 +28,6 @@ LifetimeArg =
ConstArg =
Literal | BlockExpr BlockExpr
SourceFile =
'shebang'?
Attr*