Special modifier parsing for enum entries: last of them is considered as an enum entry name #KT-9088 Fixed
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
enum class My {
|
||||
inline
|
||||
}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
JetFile: EnumInline.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('My')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('inline')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
enum class My {
|
||||
inline public,
|
||||
inner private;
|
||||
|
||||
companion object {}
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
JetFile: EnumInlinePublic.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
IMPORT_LIST
|
||||
<empty list>
|
||||
CLASS
|
||||
MODIFIER_LIST
|
||||
PsiElement(enum)('enum')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('My')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
MODIFIER_LIST
|
||||
PsiElement(inline)('inline')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('public')
|
||||
PsiElement(COMMA)(',')
|
||||
PsiWhiteSpace('\n ')
|
||||
ENUM_ENTRY
|
||||
MODIFIER_LIST
|
||||
PsiElement(inner)('inner')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('private')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
OBJECT_DECLARATION
|
||||
MODIFIER_LIST
|
||||
PsiElement(companion)('companion')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace(' \n')
|
||||
PsiElement(RBRACE)('}')
|
||||
Reference in New Issue
Block a user