Files
kotlin-fork/compiler/testData/psi/newLabels/spaceBeforeLabelReference.txt
T
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00

171 lines
5.1 KiB
Plaintext
Vendored

JetFile: spaceBeforeLabelReference.kt
PACKAGE_DIRECTIVE
<empty list>
IMPORT_LIST
<empty list>
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('foo')
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BREAK
PsiElement(break)('break')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiWhiteSpace(' ')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l1')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n\n ')
RETURN
PsiElement(return)('return')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiWhiteSpace(' ')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l2')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('2')
PsiWhiteSpace('\n\n ')
RETURN
PsiElement(return)('return')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiWhiteSpace(' ')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l3')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('3')
PsiWhiteSpace('\n\n ')
CONTINUE
PsiElement(continue)('continue')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiWhiteSpace(' ')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l4')
PsiWhiteSpace(' ')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(INTEGER_LITERAL)('5')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('6')
PsiWhiteSpace('\n\n ')
BREAK
PsiElement(break)('break')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiComment(BLOCK_COMMENT)('/**/')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l5')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('7')
PsiWhiteSpace('\n\n ')
RETURN
PsiElement(return)('return')
PsiErrorElement:There should be no space or comments before '@' in label reference
<empty list>
PsiWhiteSpace(' ')
PsiComment(BLOCK_COMMENT)('/**/')
LABEL_QUALIFIER
LABEL
PsiElement(AT)('@')
PsiElement(IDENTIFIER)('l6')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('8')
PsiWhiteSpace('\n\n ')
RETURN
PsiElement(return)('return')
PsiComment(EOL_COMMENT)('//')
PsiWhiteSpace('\n')
ANNOTATED_EXPRESSION
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('l7')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('4')
PsiWhiteSpace('\n\n ')
PROPERTY
PsiElement(val)('val')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('x')
PsiWhiteSpace(' ')
PsiElement(EQ)('=')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('9')
PsiWhiteSpace('\n')
PsiElement(RBRACE)('}')