Parser: allow names to be specified for class objects
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
class object Default
|
||||
|
||||
class object B
|
||||
|
||||
class object C {}
|
||||
|
||||
class object
|
||||
|
||||
object C
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
JetFile: NamedClassObject.kt
|
||||
PACKAGE_DIRECTIVE
|
||||
<empty list>
|
||||
CLASS
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
CLASS_OBJECT
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('Default')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CLASS_OBJECT
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CLASS_OBJECT
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiWhiteSpace(' ')
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
CLASS_OBJECT
|
||||
PsiElement(class)('class')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
OBJECT_DECLARATION
|
||||
PsiElement(object)('object')
|
||||
PsiWhiteSpace(' ')
|
||||
OBJECT_DECLARATION_NAME
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
Reference in New Issue
Block a user