[orx-kotlin-parser] Upgrade to antlr 4.10.1, upgrade Kotlin grammar

This commit is contained in:
Edwin Jakobs
2022-07-15 17:10:47 +02:00
parent f29d84ddd7
commit 17193092fc
5 changed files with 205 additions and 199 deletions

View File

@@ -96,6 +96,7 @@ delegationSpecifier
| explicitDelegation
| userType
| functionType
| SUSPEND NL* functionType
;
constructorInvocation
@@ -252,7 +253,7 @@ enumEntry
// SECTION: types
type
: typeModifiers? (parenthesizedType | nullableType | typeReference | functionType)
: typeModifiers? (functionType | parenthesizedType | nullableType | typeReference | definitelyNonNullableType)
;
typeReference
@@ -311,6 +312,10 @@ parenthesizedUserType
: LPAREN NL* (userType | parenthesizedUserType) NL* RPAREN
;
definitelyNonNullableType
: typeModifiers? (userType | parenthesizedUserType) NL* AMP NL* typeModifiers? (userType | parenthesizedUserType)
;
// SECTION: statements
statements
@@ -359,12 +364,10 @@ assignment
semi
: (SEMICOLON | NL) NL*
| EOF
;
semis
: (SEMICOLON | NL)+
| EOF
;
// SECTION: expressions