Psi: Introduce KtScriptInitializer, a separate entity for script initializers which are quite a bit different from class initializers
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ JetFile: AnonymousInitializer.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
@@ -124,7 +124,7 @@ JetFile: PropertiesFollowedByInitializers.kt
|
||||
PROPERTY_ACCESSOR
|
||||
PsiElement(get)('get')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
@@ -180,7 +180,7 @@ JetFile: PropertiesFollowedByInitializers.kt
|
||||
PsiElement(get)('get')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace(' ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
+1
-1
@@ -613,7 +613,7 @@ JetFile: ShortAnnotations.kt
|
||||
PsiErrorElement:Expecting member declaration
|
||||
PsiElement(IDENTIFIER)('zoo')
|
||||
PsiWhiteSpace(' ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
@@ -435,7 +435,7 @@ JetFile: validDeclarations.kt
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
|
||||
+1
-1
@@ -1808,7 +1808,7 @@ JetFile: BinaryTree.kt
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('TreeNode')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
+6
-6
@@ -11,7 +11,7 @@ JetFile: initRecovery.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiErrorElement:Expecting '{' after 'init'
|
||||
<empty list>
|
||||
@@ -26,7 +26,7 @@ JetFile: initRecovery.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
MODIFIER_LIST
|
||||
ANNOTATION_ENTRY
|
||||
PsiElement(AT)('@')
|
||||
@@ -50,7 +50,7 @@ JetFile: initRecovery.kt
|
||||
INTEGER_CONSTANT
|
||||
PsiElement(INTEGER_LITERAL)('1')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiErrorElement:Expecting '{' after 'init'
|
||||
<empty list>
|
||||
@@ -67,17 +67,17 @@ JetFile: initRecovery.kt
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiErrorElement:Expecting '{' after 'init'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiErrorElement:Expecting '{' after 'init'
|
||||
<empty list>
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
+2
-2
@@ -58,7 +58,7 @@ JetFile: ComplexScript.kts
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
IF
|
||||
PsiElement(if)('if')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -98,7 +98,7 @@ JetFile: ComplexScript.kts
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n')
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
FOR
|
||||
PsiElement(for)('for')
|
||||
PsiWhiteSpace(' ')
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ JetFile: Shebang.kts
|
||||
PsiWhiteSpace('\n\n')
|
||||
SCRIPT
|
||||
BLOCK
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ JetFile: ShebangIncorrect.kts
|
||||
<empty list>
|
||||
SCRIPT
|
||||
BLOCK
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
@@ -19,7 +19,7 @@ JetFile: ShebangIncorrect.kts
|
||||
PsiWhiteSpace(' ')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(HASH)('#')
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
BINARY_EXPRESSION
|
||||
PREFIX_EXPRESSION
|
||||
OPERATION_REFERENCE
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ JetFile: SimpleScript.kts
|
||||
<empty list>
|
||||
SCRIPT
|
||||
BLOCK
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ JetFile: unexpectedSymbol.kts
|
||||
<empty list>
|
||||
SCRIPT
|
||||
BLOCK
|
||||
ANONYMOUS_INITIALIZER
|
||||
SCRIPT_INITIALIZER
|
||||
CALL_EXPRESSION
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('println')
|
||||
|
||||
@@ -11,14 +11,14 @@ JetFile: anonymousInitializer.kt
|
||||
CLASS_BODY
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
MODIFIER_LIST
|
||||
PsiElement(private)('private')
|
||||
PsiWhiteSpace(' ')
|
||||
@@ -42,7 +42,7 @@ JetFile: anonymousInitializer.kt
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
@@ -93,7 +93,7 @@ JetFile: enumParsing.kt
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
@@ -126,7 +126,7 @@ JetFile: enumParsing.kt
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiElement(RBRACE)('}')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ JetFile: semicolonBetweenDeclarations.kt
|
||||
PsiElement(RPAR)(')')
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
@@ -162,7 +162,7 @@ JetFile: semicolonBetweenDeclarations.kt
|
||||
<empty list>
|
||||
PsiElement(SEMICOLON)(';')
|
||||
PsiWhiteSpace('\n ')
|
||||
ANONYMOUS_INITIALIZER
|
||||
CLASS_INITIALIZER
|
||||
PsiElement(init)('init')
|
||||
PsiErrorElement:Expecting '{' after 'init'
|
||||
<empty list>
|
||||
|
||||
Reference in New Issue
Block a user