mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Fix GenericArgs grammar
This commit is contained in:
parent
d21b5db891
commit
040b4c800d
4 changed files with 107 additions and 50 deletions
|
@ -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*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue