d28ca5bdfa
Example:
val x = { -> foo() }
391 lines
14 KiB
Plaintext
391 lines
14 KiB
Plaintext
JetFile: FunctionLiterals_ERR.kt
|
|
PACKAGE_DIRECTIVE
|
|
<empty list>
|
|
FUN
|
|
PsiElement(fun)('fun')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('foo')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
PsiElement(LBRACE)('{')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER_LIST
|
|
<empty list>
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiErrorElement:Expecting ')
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
PsiErrorElement:Type expected
|
|
<empty list>
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('A')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiErrorElement:Expecting a type
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
<empty list>
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(COMMA)(',')
|
|
PsiErrorElement:Expecting a parameter declaration
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('A')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:Expecting a parameter declaration
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('B')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('A')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:Expecting a parameter declaration
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiErrorElement:Expecting parameter declaration
|
|
<empty list>
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
BLOCK
|
|
DOT_QUALIFIED_EXPRESSION
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(DOT)('.')
|
|
CALL_EXPRESSION
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('t')
|
|
VALUE_ARGUMENT_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_ARGUMENT
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
BLOCK
|
|
BINARY_EXPRESSION
|
|
DOT_QUALIFIED_EXPRESSION
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(DOT)('.')
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('t')
|
|
PsiWhiteSpace(' ')
|
|
OPERATION_REFERENCE
|
|
PsiElement(MINUS)('-')
|
|
PARENTHESIZED
|
|
PsiElement(LPAR)('(')
|
|
BINARY_WITH_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
OPERATION_REFERENCE
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('A')
|
|
PsiElement(RPAR)(')')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
PsiErrorElement:To specify a type of a parameter or a return type, use the full notation: {(parameter : Type) : ReturnType -> ...}
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('b')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiErrorElement:Expecting parameter name
|
|
<empty list>
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('f')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(DOT)('.')
|
|
VALUE_PARAMETER_LIST
|
|
PsiErrorElement:Expecting a parameter list in parentheses (...)
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiErrorElement:Expecting parameter declaration
|
|
<empty list>
|
|
PsiElement(COLON)(':')
|
|
PsiWhiteSpace(' ')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('b')
|
|
PsiErrorElement:Expecting ')
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(ARROW)('->')
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('f')
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('b')
|
|
PsiElement(RPAR)(')')
|
|
PsiErrorElement:An -> is expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
<empty list>
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
TYPE_REFERENCE
|
|
USER_TYPE
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('T')
|
|
PsiElement(DOT)('.')
|
|
VALUE_PARAMETER_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('b')
|
|
PsiElement(RPAR)(')')
|
|
PsiErrorElement:An -> is expected
|
|
<empty list>
|
|
PsiWhiteSpace(' ')
|
|
BLOCK
|
|
<empty list>
|
|
PsiElement(RBRACE)('}')
|
|
PsiWhiteSpace('\n ')
|
|
FUNCTION_LITERAL_EXPRESSION
|
|
FUNCTION_LITERAL
|
|
PsiElement(LBRACE)('{')
|
|
VALUE_PARAMETER_LIST
|
|
VALUE_PARAMETER
|
|
PsiElement(IDENTIFIER)('a')
|
|
PsiElement(COMMA)(',')
|
|
PsiWhiteSpace(' ')
|
|
VALUE_PARAMETER
|
|
PsiErrorElement:Expecting parameter name
|
|
PsiElement(RBRACE)('}')
|
|
PsiErrorElement:Expecting '->' or ','
|
|
<empty list>
|
|
PsiWhiteSpace('\n')
|
|
BLOCK
|
|
<empty list>
|
|
PsiElement(RBRACE)('}')
|
|
PsiErrorElement:Expecting '}'
|
|
<empty list> |