From 04f5db774a2bd4790bb0edf783c0ae52292bac92 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Wed, 12 Jan 2011 19:29:29 +0300 Subject: [PATCH] Lables: break and continue accept only string literals --- idea/testData/psi/ControlStructures.txt | 810 ++++++++++++------------ idea/testData/psi/SimpleExpressions.txt | 16 +- 2 files changed, 413 insertions(+), 413 deletions(-) diff --git a/idea/testData/psi/ControlStructures.txt b/idea/testData/psi/ControlStructures.txt index 8002e61c255..86a705f982c 100644 --- a/idea/testData/psi/ControlStructures.txt +++ b/idea/testData/psi/ControlStructures.txt @@ -78,7 +78,7 @@ JetFile: ControlStructures.jet BREAK PsiElement(break)('break') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') VALUE_PARAMETER @@ -110,7 +110,7 @@ JetFile: ControlStructures.jet CONTINUE PsiElement(continue)('continue') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') VALUE_PARAMETER @@ -188,24 +188,24 @@ JetFile: ControlStructures.jet BREAK PsiElement(break)('break') PsiWhiteSpace('\n ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('la') + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') BREAK PsiElement(break)('break') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') CONTINUE PsiElement(continue)('continue') PsiWhiteSpace('\n ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('la') + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') CONTINUE PsiElement(continue)('continue') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') IF PsiElement(if)('if') @@ -551,427 +551,427 @@ JetFile: ControlStructures.jet BOOLEAN_CONSTANT PsiElement(false)('false') PsiElement(RPAR)(')') - PsiWhiteSpace('\n\n') - FUN - PsiElement(fun)('fun') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + FOR + PsiElement(for)('for') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - TYPE_PARAMETER_LIST + PsiElement(LPAR)('(') + LOOP_PARAMETER + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(in)('in') + PsiWhiteSpace(' ') + LOOP_RANGE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + BODY + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n\n ') + FOR + PsiElement(for)('for') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + LOOP_PARAMETER + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(in)('in') + PsiWhiteSpace(' ') + LOOP_RANGE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + BODY + + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FOR + PsiElement(for)('for') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + LOOP_PARAMETER + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(in)('in') + PsiWhiteSpace(' ') + LOOP_RANGE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FOR + PsiElement(for)('for') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + LOOP_PARAMETER + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + PsiElement(in)('in') + PsiWhiteSpace(' ') + LOOP_RANGE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + BODY - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n\n ') + WHILE + PsiElement(while)('while') PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - FOR - PsiElement(for)('for') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - LOOP_PARAMETER + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') PsiElement(in)('in') PsiWhiteSpace(' ') - LOOP_RANGE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - BODY - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n\n ') - FOR - PsiElement(for)('for') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - LOOP_PARAMETER - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - LOOP_RANGE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FOR - PsiElement(for)('for') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - LOOP_PARAMETER - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - LOOP_RANGE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FOR - PsiElement(for)('for') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - LOOP_PARAMETER - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - LOOP_RANGE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') - BODY - - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + BODY REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n\n ') - WHILE - PsiElement(while)('while') + PsiWhiteSpace('\n\n ') + WHILE + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') + PsiElement(in)('in') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') BODY REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n\n ') - WHILE - PsiElement(while)('while') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + WHILE + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') + PsiElement(in)('in') PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - WHILE - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(in)('in') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(RPAR)(')') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiElement(RPAR)(')') + BODY + + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n\n ') + WHILE + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') BODY - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n ') + PsiElement(else)('else') + PsiWhiteSpace('\n ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n\n ') - WHILE - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - BODY - - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - PsiElement(else)('else') - PsiWhiteSpace('\n ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - PsiElement(else)('else') - PsiWhiteSpace('\n ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - + PsiWhiteSpace('\n ') + PsiElement(else)('else') + PsiWhiteSpace('\n ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - DO_WHILE - PsiElement(do)('do') - PsiWhiteSpace(' ') - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('r') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - DO_WHILE - PsiElement(do)('do') - PsiWhiteSpace(' ') + PsiWhiteSpace('\n\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n\n ') + DO_WHILE + PsiElement(do)('do') + PsiWhiteSpace(' ') + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('r') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + DO_WHILE + PsiElement(do)('do') + PsiWhiteSpace(' ') + BODY + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('r') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + DO_WHILE + PsiElement(do)('do') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') BODY + PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION + PsiElement(SEMICOLON)(';') REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('r') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - DO_WHILE - PsiElement(do)('do') + PsiElement(IDENTIFIER)('bar') + PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') + PsiElement(SEMICOLON)(';') PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - BODY - PsiElement(SEMICOLON)(';') - PsiElement(SEMICOLON)(';') - PsiElement(SEMICOLON)(';') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('foo') - PsiElement(SEMICOLON)(';') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('bar') - PsiElement(SEMICOLON)(';') - PsiElement(SEMICOLON)(';') - PsiElement(SEMICOLON)(';') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace(' ') - PsiElement(RBRACE)('}') - PsiWhiteSpace(' ') - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('r') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') - PsiErrorElement:Expecting '} - \ No newline at end of file + PsiElement(RBRACE)('}') + PsiWhiteSpace(' ') + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('r') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/idea/testData/psi/SimpleExpressions.txt b/idea/testData/psi/SimpleExpressions.txt index 748df7d3d75..809ddd01075 100644 --- a/idea/testData/psi/SimpleExpressions.txt +++ b/idea/testData/psi/SimpleExpressions.txt @@ -511,7 +511,7 @@ JetFile: SimpleExpressions.jet BREAK PsiElement(break)('break') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') VALUE_PARAMETER @@ -543,7 +543,7 @@ JetFile: SimpleExpressions.jet CONTINUE PsiElement(continue)('continue') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') VALUE_PARAMETER @@ -625,23 +625,23 @@ JetFile: SimpleExpressions.jet BREAK PsiElement(break)('break') PsiWhiteSpace('\n ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('la') + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') BREAK PsiElement(break)('break') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') CONTINUE PsiElement(continue)('continue') PsiWhiteSpace('\n ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('la') + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n ') CONTINUE PsiElement(continue)('continue') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('la') + PsiElement(STRING_LITERAL)('"la"') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') \ No newline at end of file