7bb9f97b11
This fix allows to write one-liner scripts like "val x = 3; println(x)", which were previously rejected by the parser.
35 lines
1021 B
Plaintext
Vendored
35 lines
1021 B
Plaintext
Vendored
KtFile: OneLiner.kts
|
|
PACKAGE_DIRECTIVE
|
|
<empty list>
|
|
IMPORT_LIST
|
|
<empty list>
|
|
SCRIPT
|
|
BLOCK
|
|
PROPERTY
|
|
PsiElement(val)('val')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
PsiElement(EQ)('=')
|
|
PsiWhiteSpace(' ')
|
|
INTEGER_CONSTANT
|
|
PsiElement(INTEGER_LITERAL)('6')
|
|
PsiElement(SEMICOLON)(';')
|
|
PsiWhiteSpace(' ')
|
|
SCRIPT_INITIALIZER
|
|
CALL_EXPRESSION
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('println')
|
|
VALUE_ARGUMENT_LIST
|
|
PsiElement(LPAR)('(')
|
|
VALUE_ARGUMENT
|
|
BINARY_EXPRESSION
|
|
REFERENCE_EXPRESSION
|
|
PsiElement(IDENTIFIER)('x')
|
|
PsiWhiteSpace(' ')
|
|
OPERATION_REFERENCE
|
|
PsiElement(MUL)('*')
|
|
PsiWhiteSpace(' ')
|
|
INTEGER_CONSTANT
|
|
PsiElement(INTEGER_LITERAL)('7')
|
|
PsiElement(RPAR)(')') |