Parse collection literals as atomic expressions

This commit is contained in:
Mikhail Zarechenskiy
2017-03-17 12:40:47 +03:00
parent 3c7678092e
commit d3fd96ceed
10 changed files with 341 additions and 45 deletions
+32 -31
View File
@@ -35,49 +35,50 @@ JetFile: oldAnnotationsRecovery.kt
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
PsiErrorElement:Expecting an element
COLLECTION_LITERAL_EXPRESSION
PsiElement(LBRACKET)('[')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('inline')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
<empty list>
PsiWhiteSpace(' ')
FUN
PsiElement(fun)('fun')
PsiWhiteSpace(' ')
PsiElement(IDENTIFIER)('bar')
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
LAMBDA_EXPRESSION
FUNCTION_LITERAL
VALUE_PARAMETER_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
BLOCK
PsiElement(LBRACE)('{')
PsiWhiteSpace('\n ')
BLOCK
RETURN
PsiElement(return)('return')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
RETURN
PsiElement(return)('return')
PsiWhiteSpace(' ')
INTEGER_CONSTANT
PsiElement(INTEGER_LITERAL)('1')
PsiWhiteSpace('\n ')
PsiElement(RBRACE)('}')
PsiWhiteSpace('\n\n ')
PsiErrorElement:Expecting an element
COLLECTION_LITERAL_EXPRESSION
PsiElement(LBRACKET)('[')
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('suppress')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_TEMPLATE
PsiElement(OPEN_QUOTE)('"')
LITERAL_STRING_TEMPLATE_ENTRY
PsiElement(REGULAR_STRING_PART)('1')
PsiElement(CLOSING_QUOTE)('"')
PsiElement(RPAR)(')')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
CALL_EXPRESSION
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('suppress')
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
VALUE_ARGUMENT
STRING_TEMPLATE
PsiElement(OPEN_QUOTE)('"')
LITERAL_STRING_TEMPLATE_ENTRY
PsiElement(REGULAR_STRING_PART)('1')
PsiElement(CLOSING_QUOTE)('"')
PsiElement(RPAR)(')')
PsiElement(RBRACKET)(']')
PsiWhiteSpace(' ')
PsiWhiteSpace(' ')
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
PsiElement(INTEGER_LITERAL)('1')
PsiElement(PLUS)('+')
PsiElement(INTEGER_LITERAL)('1')