Fix Return Type Syntax to include .. (i.e. method(..) and not method()) as specified in the RFC

This commit is contained in:
Chayim Refael Friedman 2024-08-26 01:45:52 +03:00
parent 7106cd3be5
commit 21e6058ab7
12 changed files with 183 additions and 16 deletions

View file

@ -38,8 +38,12 @@ PathSegment =
'::'? NameRef
| NameRef GenericArgList?
| NameRef ParamList RetType?
| NameRef ReturnTypeSyntax
| '<' Type ('as' PathType)? '>'
ReturnTypeSyntax =
'(' '..' ')'
//*************************//
// Generics //
@ -59,7 +63,7 @@ TypeArg =
AssocTypeArg =
NameRef
(GenericArgList | ParamList RetType?)?
(GenericArgList | ParamList RetType? | ReturnTypeSyntax)?
(':' TypeBoundList | ('=' Type | ConstArg))
LifetimeArg =