From fc669d18b9ff4841fddb78dcb74af340fe338b5f Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 3 Jan 2011 17:09:29 +0300 Subject: [PATCH] Object expressions marked --- idea/src/org/jetbrains/jet/JetNodeTypes.java | 1 + .../lang/parsing/JetExpressionParsing.java | 5 + idea/testData/psi/SimpleClassMembers.txt | 390 +++--- idea/testData/psi/SimpleExpressions.txt | 23 +- .../psi/examples/AnonymousObjects.txt | 258 ++-- idea/testData/psi/examples/BinaryTree.txt | 1143 +++++++++-------- idea/testData/psi/examples/Builder.txt | 283 ++-- .../psi/examples/PolymorphicClassObjects.txt | 97 +- .../testData/psi/examples/UpdateOperation.txt | 143 ++- .../psi/examples/collections/ArrayList.txt | 415 +++--- 10 files changed, 1391 insertions(+), 1367 deletions(-) diff --git a/idea/src/org/jetbrains/jet/JetNodeTypes.java b/idea/src/org/jetbrains/jet/JetNodeTypes.java index e0cde6927b8..841233e1530 100644 --- a/idea/src/org/jetbrains/jet/JetNodeTypes.java +++ b/idea/src/org/jetbrains/jet/JetNodeTypes.java @@ -100,6 +100,7 @@ public interface JetNodeTypes { JetNodeType MATCH_ENTRY = new JetNodeType("MATCH_ENTRY"); JetNodeType PATTERN = new JetNodeType("PATTERN"); JetNodeType TUPLE_PATTERN = new JetNodeType("TUPLE_PATTERN"); + JetNodeType OBJECT_LITERAL = new JetNodeType("OBJECT_LITERAL"); IElementType NAMESPACE_NAME = new JetNodeType("NAMESPACE_NAME"); } diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index 26f91629a6a..7fe5d1006b7 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -272,6 +272,8 @@ public class JetExpressionParsing extends AbstractJetParsing { * ; */ private void parseAtomicExpression() { + + // TODO: namespace.a.b.C // System.out.println("atom at " + myBuilder.getTokenText()); @@ -1127,6 +1129,8 @@ public class JetExpressionParsing extends AbstractJetParsing { public void parseObjectLiteral() { assert at(OBJECT_KEYWORD); + PsiBuilder.Marker literal = mark(); + advance(); // OBJECT_KEYWORD if (at(LBRACE)) { @@ -1138,6 +1142,7 @@ public class JetExpressionParsing extends AbstractJetParsing { myJetParsing.parseClassBody(); } } + literal.done(OBJECT_LITERAL); } private void parseOneTokenExpression(JetNodeType type) { diff --git a/idea/testData/psi/SimpleClassMembers.txt b/idea/testData/psi/SimpleClassMembers.txt index 2f5a715f212..59a633c14a1 100644 --- a/idea/testData/psi/SimpleClassMembers.txt +++ b/idea/testData/psi/SimpleClassMembers.txt @@ -175,76 +175,13 @@ JetFile: SimpleClassMembers.jet CLASS_OBJECT PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiElement(COMMA)(',') + OBJECT_LITERAL + PsiElement(object)('object') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_BY - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - PsiElement(by)('by') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') CLASS_OBJECT MODIFIER_LIST @@ -252,35 +189,103 @@ JetFile: SimpleClassMembers.jet PsiWhiteSpace(' ') PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiElement(COMMA)(',') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_BY - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - PsiElement(by)('by') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiElement(COMMA)(',') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CALL - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Goo') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_BY + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Bar') + PsiWhiteSpace(' ') + PsiElement(by)('by') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_BY + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Bar') + PsiWhiteSpace(' ') + PsiElement(by)('by') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CALL + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Goo') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') PsiWhiteSpace('\n ') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') @@ -525,76 +530,13 @@ JetFile: SimpleClassMembers.jet CLASS_OBJECT PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - CLASS_OBJECT - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(class)('class') - PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiElement(COMMA)(',') + OBJECT_LITERAL + PsiElement(object)('object') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_BY - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - PsiElement(by)('by') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') CLASS_OBJECT MODIFIER_LIST @@ -602,34 +544,102 @@ JetFile: SimpleClassMembers.jet PsiWhiteSpace(' ') PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Fooo') - PsiElement(COMMA)(',') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_BY - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Bar') - PsiWhiteSpace(' ') - PsiElement(by)('by') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') - PsiElement(COMMA)(',') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') PsiWhiteSpace(' ') - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CALL - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Goo') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_BY + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Bar') + PsiWhiteSpace(' ') + PsiElement(by)('by') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + CLASS_OBJECT + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(class)('class') + PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Fooo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_BY + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Bar') + PsiWhiteSpace(' ') + PsiElement(by)('by') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('foo') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CALL + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Goo') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') PsiWhiteSpace('\n\n\n') PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/idea/testData/psi/SimpleExpressions.txt b/idea/testData/psi/SimpleExpressions.txt index 560f4f0c667..de45b34ea3e 100644 --- a/idea/testData/psi/SimpleExpressions.txt +++ b/idea/testData/psi/SimpleExpressions.txt @@ -426,17 +426,18 @@ JetFile: SimpleExpressions.jet PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Foo') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiElement(RBRACE)('}') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Foo') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiElement(RBRACE)('}') PsiElement(COMMA)(',') PsiWhiteSpace('\n ') VALUE_PARAMETER diff --git a/idea/testData/psi/examples/AnonymousObjects.txt b/idea/testData/psi/examples/AnonymousObjects.txt index 60f17549b88..64d90fd6661 100644 --- a/idea/testData/psi/examples/AnonymousObjects.txt +++ b/idea/testData/psi/examples/AnonymousObjects.txt @@ -18,97 +18,98 @@ JetFile: AnonymousObjects.jet VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CALL - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('MouseAdapter') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(var)('var') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('clickCount') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('0') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('mouseClicked') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - VALUE_PARAMETER - PsiElement(IDENTIFIER)('e') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CALL TYPE_REFERENCE USER_TYPE - PsiElement(IDENTIFIER)('MouseEvent') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - POSTFIX_EXPRESSION - PsiElement(IDENTIFIER)('clickCount') - PsiElement(PLUSPLUS)('++') + PsiElement(IDENTIFIER)('MouseAdapter') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(var)('var') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('clickCount') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('0') PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('mouseClicked') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('clickCount') - PsiWhiteSpace(' ') - PsiElement(GT)('>') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('3') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('e') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('MouseEvent') PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('GOD') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('sendMessage') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('GodMEssages') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('TOO_MANY_CLICKS') - PsiElement(RPAR)(')') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + POSTFIX_EXPRESSION + PsiElement(IDENTIFIER)('clickCount') + PsiElement(PLUSPLUS)('++') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('clickCount') + PsiWhiteSpace(' ') + PsiElement(GT)('>') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('3') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('GOD') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('sendMessage') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('GodMEssages') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('TOO_MANY_CLICKS') + PsiElement(RPAR)(')') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') PsiElement(RPAR)(')') PsiWhiteSpace('\n\n') CLASS @@ -145,50 +146,51 @@ JetFile: AnonymousObjects.jet PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - FUN - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('sendMessage') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - VALUE_PARAMETER - PsiElement(IDENTIFIER)('message') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('GodMEssage') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - THROW - PsiElement(throw)('throw') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + FUN + PsiElement(fun)('fun') PsiWhiteSpace(' ') - NEW - PsiElement(new)('new') + PsiElement(IDENTIFIER)('sendMessage') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('message') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('GodMEssage') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + THROW + PsiElement(throw)('throw') PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('RuntimeException') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('message') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('name') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n') - PsiElement(RBRACE)('}') + NEW + PsiElement(new)('new') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('RuntimeException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('message') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('name') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n') + PsiElement(RBRACE)('}') PsiElement(SEMICOLON)(';') PsiWhiteSpace('\n\n\n') PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/idea/testData/psi/examples/BinaryTree.txt b/idea/testData/psi/examples/BinaryTree.txt index 26f2716d811..290c6f660f8 100644 --- a/idea/testData/psi/examples/BinaryTree.txt +++ b/idea/testData/psi/examples/BinaryTree.txt @@ -1668,601 +1668,602 @@ JetFile: BinaryTree.jet PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('IMutableIterator') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - DOT_QIALIFIED_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('BinaryTree') - PsiElement(DOT)('.') - PsiElement(this)('this') - PsiElement(DOT)('.') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('IMutableIterator') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('version') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('down') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('Stack') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('TreeNode') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('up') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('Stack') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('TreeNode') - PsiElement(GT)('>') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(var)('var') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('lastNode') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('TreeNode') - PsiWhiteSpace('\n\n ') - CONSTRUCTOR - PsiElement(this)('this') - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('root') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') - NULL - PsiElement(null)('null') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('push') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('root') - PsiElement(RPAR)(')') - PsiWhiteSpace(' \n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('next') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('T') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - PREFIX_EXPRESSION - PsiElement(EXCL)('!') - PsiElement(IDENTIFIER)('hasNext') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - THROW - PsiElement(throw)('throw') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('NoMoreElementsException') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('checkVersion') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n\n ') - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('lastNode') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('nextNode') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('lastNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('value') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('nextNode') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('TreeNode') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - WHILE - PsiElement(while)('while') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BOOLEAN_CONSTANT - PsiElement(true)('true') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BODY - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - PREFIX_EXPRESSION - PsiElement(EXCL)('!') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('isEmpty') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('curNode') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('pop') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('left') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') - NULL - PsiElement(null)('null') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('up') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('push') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('curNode') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('push') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('left') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace(' ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('right') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') - NULL - PsiElement(null)('null') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('push') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('right') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('curNode') - PsiElement(SEMICOLON)(';') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace(' ') - PsiElement(else)('else') - PsiWhiteSpace(' ') - ELSE - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('curNode') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('up') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('pop') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('right') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') - NULL - PsiElement(null)('null') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('push') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('curNode') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('right') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - RETURN - PsiElement(return)('return') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('curNode') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('hasNext') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Boolean') - PsiWhiteSpace('\n ') - PROPERTY_ACCESSOR - PsiElement(get)('get') - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - BINARY_EXPRESSION - PREFIX_EXPRESSION - PsiElement(EXCL)('!') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('down') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('isEmpty') - PsiWhiteSpace(' ') - PsiElement(OROR)('||') - PsiWhiteSpace(' ') - PREFIX_EXPRESSION - PsiElement(EXCL)('!') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('up') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('isEmpty') - PsiWhiteSpace('\n\n\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('remove') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('BinaryTree') + PsiElement(DOT)('.') + PsiElement(this)('this') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('down') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') CALL_EXPRESSION - PsiElement(IDENTIFIER)('checkVersion') + PsiElement(IDENTIFIER)('Stack') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('TreeNode') + PsiElement(GT)('>') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('up') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('Stack') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('TreeNode') + PsiElement(GT)('>') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(var)('var') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('lastNode') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace('\n\n ') + CONSTRUCTOR + PsiElement(this)('this') + VALUE_PARAMETER_LIST PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('lastNode') - PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') - PsiWhiteSpace(' ') - NULL - PsiElement(null)('null') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - THROW - PsiElement(throw)('throw') - PsiWhiteSpace(' ') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('root') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + NULL + PsiElement(null)('null') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN CALL_EXPRESSION - PsiElement(IDENTIFIER)('IterationException') + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('push') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') VALUE_ARGUMENT - STRING_CONSTANT - PsiElement(STRING_LITERAL)('"Nothing to remove"') + PsiElement(IDENTIFIER)('root') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('remove') - VALUE_ARGUMENT_LIST + PsiWhiteSpace(' \n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('next') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('T') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('lastNode') + CONDITION + PREFIX_EXPRESSION + PsiElement(EXCL)('!') + PsiElement(IDENTIFIER)('hasNext') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - POSTFIX_EXPRESSION - PsiElement(IDENTIFIER)('version') - PsiElement(PLUSPLUS)('++') - PsiWhiteSpace('\n ') - BINARY_EXPRESSION - DOT_QIALIFIED_EXPRESSION + PsiWhiteSpace('\n ') + THEN + THROW + PsiElement(throw)('throw') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('NoMoreElementsException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('checkVersion') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n\n ') + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('lastNode') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('nextNode') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('BinaryTree') + PsiElement(IDENTIFIER)('lastNode') PsiElement(DOT)('.') - PsiElement(this)('this') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('version') + PsiElement(IDENTIFIER)('value') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('nextNode') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('TreeNode') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + WHILE + PsiElement(while)('while') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BOOLEAN_CONSTANT + PsiElement(true)('true') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BODY + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + PREFIX_EXPRESSION + PsiElement(EXCL)('!') + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('isEmpty') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('curNode') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('pop') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('left') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + NULL + PsiElement(null)('null') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('up') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('push') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('curNode') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('push') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('left') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace(' ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('right') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + NULL + PsiElement(null)('null') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('push') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('right') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('curNode') + PsiElement(SEMICOLON)(';') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace(' ') + PsiElement(else)('else') + PsiWhiteSpace(' ') + ELSE + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('curNode') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('up') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('pop') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('right') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + NULL + PsiElement(null)('null') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('down') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('push') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('curNode') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('right') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + RETURN + PsiElement(return)('return') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('curNode') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('hasNext') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Boolean') + PsiWhiteSpace('\n ') + PROPERTY_ACCESSOR + PsiElement(get)('get') + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('checkVersion') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') + BINARY_EXPRESSION + PREFIX_EXPRESSION + PsiElement(EXCL)('!') DOT_QIALIFIED_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('BinaryTree') - PsiElement(DOT)('.') - PsiElement(this)('this') + PsiElement(IDENTIFIER)('down') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('version') + PsiElement(IDENTIFIER)('isEmpty') + PsiWhiteSpace(' ') + PsiElement(OROR)('||') + PsiWhiteSpace(' ') + PREFIX_EXPRESSION + PsiElement(EXCL)('!') + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('up') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('isEmpty') + PsiWhiteSpace('\n\n\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('remove') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - THEN - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - THROW - PsiElement(throw)('throw') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('ConcurrentModificationException') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace(' \n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('checkVersion') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('lastNode') + PsiWhiteSpace(' ') + PsiElement(EQEQ)('==') + PsiWhiteSpace(' ') + NULL + PsiElement(null)('null') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + THROW + PsiElement(throw)('throw') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('IterationException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"Nothing to remove"') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('remove') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('lastNode') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + POSTFIX_EXPRESSION + PsiElement(IDENTIFIER)('version') + PsiElement(PLUSPLUS)('++') + PsiWhiteSpace('\n ') + BINARY_EXPRESSION + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('BinaryTree') + PsiElement(DOT)('.') + PsiElement(this)('this') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('checkVersion') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('BinaryTree') + PsiElement(DOT)('.') + PsiElement(this)('this') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('version') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + THEN + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + THROW + PsiElement(throw)('throw') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('ConcurrentModificationException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace(' \n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PsiElement(RBRACE)('}') \ No newline at end of file diff --git a/idea/testData/psi/examples/Builder.txt b/idea/testData/psi/examples/Builder.txt index 49f77be7439..77541e0d6f4 100644 --- a/idea/testData/psi/examples/Builder.txt +++ b/idea/testData/psi/examples/Builder.txt @@ -9,155 +9,156 @@ JetFile: Builder.jet PsiWhiteSpace(' ') CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CALL - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('AntBuilder') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(lazy)('lazy') - PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('groovy') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('library') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CALL + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('AntBuilder') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(lazy)('lazy') PsiWhiteSpace(' ') - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - PsiElement(IDENTIFIER)('classpath') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_CONSTANT - PsiElement(STRING_LITERAL)('"$libs/groovy-..."') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(lazy)('lazy') - PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('gant') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('library') + PsiElement(val)('val') PsiWhiteSpace(' ') - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('groovy') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('library') + PsiWhiteSpace(' ') + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION + PsiElement(IDENTIFIER)('classpath') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"$libs/groovy-..."') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(lazy)('lazy') + PsiWhiteSpace(' ') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('gant') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('library') + PsiWhiteSpace(' ') + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION - NEW - PsiElement(new)('new') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('File') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_CONSTANT - PsiElement(STRING_LITERAL)('"$gantHome/lib"') - PsiElement(RPAR)(')') + DOT_QIALIFIED_EXPRESSION + NEW + PsiElement(new)('new') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('File') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"$gantHome/lib"') + PsiElement(RPAR)(')') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('files') PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('files') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('each') - PsiWhiteSpace(' ') - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - CALL_EXPRESSION - PsiElement(IDENTIFIER)('classpath') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('it') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(lazy)('lazy') - PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('JPS') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('module') + PsiElement(IDENTIFIER)('each') + PsiWhiteSpace(' ') + FUNCTION_LITERAL + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + BODY + CALL_EXPRESSION + PsiElement(IDENTIFIER)('classpath') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('it') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(lazy)('lazy') PsiWhiteSpace(' ') - FUNCTION_LITERAL - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - BODY - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('targetLevel') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - STRING_CONSTANT - PsiElement(STRING_LITERAL)('"1.5"') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('JPS') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('module') + PsiWhiteSpace(' ') + FUNCTION_LITERAL + PsiElement(LBRACE)('{') PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('classpath') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('antLayout') - PsiElement(COMMA)(',') + BODY + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('targetLevel') PsiWhiteSpace(' ') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('gant') - PsiElement(COMMA)(',') + PsiElement(EQ)('=') PsiWhiteSpace(' ') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('groovy') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('src') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - STRING_CONSTANT - PsiElement(STRING_LITERAL)('"$projectHome/antLayout/src"') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n') - PsiElement(RBRACE)('}') + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"1.5"') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('classpath') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('antLayout') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('gant') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('groovy') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('src') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + STRING_CONSTANT + PsiElement(STRING_LITERAL)('"$projectHome/antLayout/src"') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n') + PsiElement(RBRACE)('}') PsiElement(DOT)('.') PsiElement(IDENTIFIER)('build') VALUE_ARGUMENT_LIST diff --git a/idea/testData/psi/examples/PolymorphicClassObjects.txt b/idea/testData/psi/examples/PolymorphicClassObjects.txt index 160ab00758c..8f851551a50 100644 --- a/idea/testData/psi/examples/PolymorphicClassObjects.txt +++ b/idea/testData/psi/examples/PolymorphicClassObjects.txt @@ -129,56 +129,57 @@ JetFile: PolymorphicClassObjects.jet CLASS_OBJECT PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CLASS + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CLASS + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Buildable') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('newBuilder') + TYPE_PARAMETER_LIST + PsiElement(LT)('<') + TYPE_PARAMETER + PsiElement(IDENTIFIER)('E') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + TYPE_PARAMETER + PsiElement(IDENTIFIER)('R') + PsiElement(GT)('>') + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE - PsiElement(IDENTIFIER)('Buildable') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('newBuilder') - TYPE_PARAMETER_LIST - PsiElement(LT)('<') - TYPE_PARAMETER - PsiElement(IDENTIFIER)('E') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - TYPE_PARAMETER - PsiElement(IDENTIFIER)('R') - PsiElement(GT)('>') - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Builder') - TYPE_ARGUMENT_LIST - PsiElement(LT)('<') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('E') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('R') - PsiElement(GT)('>') - PsiWhiteSpace('\n\n ') - PsiElement(RBRACE)('}') + PsiElement(IDENTIFIER)('Builder') + TYPE_ARGUMENT_LIST + PsiElement(LT)('<') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('E') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('R') + PsiElement(GT)('>') + PsiWhiteSpace('\n\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') diff --git a/idea/testData/psi/examples/UpdateOperation.txt b/idea/testData/psi/examples/UpdateOperation.txt index 4d81fd223d1..25825fcb9e4 100644 --- a/idea/testData/psi/examples/UpdateOperation.txt +++ b/idea/testData/psi/examples/UpdateOperation.txt @@ -34,82 +34,83 @@ JetFile: UpdateOperation.jet CLASS_OBJECT PsiElement(class)('class') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - FUN - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('copy') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - VALUE_PARAMETER - PsiElement(IDENTIFIER)('from') + OBJECT_LITERAL + PsiElement(object)('object') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + FUN + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('copy') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('from') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Pair') + PsiElement(COMMA)(',') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Int') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('from') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('x') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_PARAMETER + PsiElement(IDENTIFIER)('y') + PsiWhiteSpace(' ') + PsiElement(COLON)(':') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('Int') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('from') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('y') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + NEW + PsiElement(new)('new') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE PsiElement(IDENTIFIER)('Pair') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_PARAMETER - PsiElement(IDENTIFIER)('x') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Int') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('from') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('x') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_PARAMETER - PsiElement(IDENTIFIER)('y') - PsiWhiteSpace(' ') - PsiElement(COLON)(':') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Int') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('from') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('y') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - NEW - PsiElement(new)('new') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('Pair') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('x') - PsiElement(COMMA)(',') - PsiWhiteSpace(' ') - VALUE_ARGUMENT - PsiElement(IDENTIFIER)('y') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('x') + PsiElement(COMMA)(',') + PsiWhiteSpace(' ') + VALUE_ARGUMENT + PsiElement(IDENTIFIER)('y') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n') PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n') diff --git a/idea/testData/psi/examples/collections/ArrayList.txt b/idea/testData/psi/examples/collections/ArrayList.txt index c00f2b120e9..e62199685f3 100644 --- a/idea/testData/psi/examples/collections/ArrayList.txt +++ b/idea/testData/psi/examples/collections/ArrayList.txt @@ -133,231 +133,232 @@ JetFile: ArrayList.jet PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(object)('object') - PsiWhiteSpace(' ') - DELEGATION_SPECIFIER_LIST - DELEGATION_SPECIFIER - DELEGATOR_SUPER_CALL - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('IMutableIterator') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - CLASS_BODY - PsiElement(LBRACE)('{') + OBJECT_LITERAL + PsiElement(object)('object') PsiWhiteSpace(' ') - PsiComment(EOL_COMMENT)('// T is inferred') - PsiWhiteSpace('\n ') - PROPERTY - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('index') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('0') - PsiWhiteSpace('\n ') - PROPERTY - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(var)('var') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('myVersion') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(private)('private') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('checkVersion') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('myVersion') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - THROW - PsiElement(throw)('throw') - PsiWhiteSpace(' ') - NEW - PsiElement(new)('new') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('ConcurrentModificationException') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('next') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('checkVersion') + DELEGATION_SPECIFIER_LIST + DELEGATION_SPECIFIER + DELEGATOR_SUPER_CALL + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('IMutableIterator') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - IF - PsiElement(if)('if') - PsiWhiteSpace(' ') - PsiElement(LPAR)('(') - CONDITION - PsiElement(IDENTIFIER)('hasNext') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - THEN - THROW - PsiElement(throw)('throw') - PsiWhiteSpace(' ') - NEW - PsiElement(new)('new') - PsiWhiteSpace(' ') - TYPE_REFERENCE - USER_TYPE - PsiElement(IDENTIFIER)('NoMoreElementsException') - VALUE_ARGUMENT_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - ARRAY_ACCESS_EXPRESSION - PsiElement(IDENTIFIER)('data') - INDICES - PsiElement(LBRACKET)('[') - POSTFIX_EXPRESSION - PsiElement(IDENTIFIER)('index') - PsiElement(PLUSPLUS)('++') - PsiElement(RBRACKET)(']') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n\n ') - PROPERTY - MODIFIER_LIST - PsiElement(override)('override') + PsiWhiteSpace(' ') + CLASS_BODY + PsiElement(LBRACE)('{') PsiWhiteSpace(' ') - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('hasNext') - PsiWhiteSpace('\n ') - PROPERTY_ACCESSOR - PsiElement(get)('get') - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') + PsiComment(EOL_COMMENT)('// T is inferred') + PsiWhiteSpace('\n ') + PROPERTY + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('index') - PsiWhiteSpace(' ') - PsiElement(LT)('<') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('used') - PsiWhiteSpace('\n\n\n ') - FUN - MODIFIER_LIST - PsiElement(override)('override') - PsiWhiteSpace(' ') - PsiElement(fun)('fun') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('remove') - TYPE_PARAMETER_LIST - - VALUE_PARAMETER_LIST - PsiElement(LPAR)('(') - PsiElement(RPAR)(')') - PsiWhiteSpace(' ') - BLOCK - PsiElement(LBRACE)('{') - PsiWhiteSpace('\n ') - CALL_EXPRESSION - PsiElement(IDENTIFIER)('checkVersion') - VALUE_ARGUMENT_LIST + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('0') + PsiWhiteSpace('\n ') + PROPERTY + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(var)('var') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('myVersion') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(private)('private') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('checkVersion') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') PsiElement(LPAR)('(') + CONDITION + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace(' ') + PsiElement(EXCLEQ)('!=') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('myVersion') PsiElement(RPAR)(')') - PsiWhiteSpace('\n ') - PROPERTY - PsiElement(val)('val') - PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') + PsiWhiteSpace('\n ') + THEN + THROW + PsiElement(throw)('throw') + PsiWhiteSpace(' ') + NEW + PsiElement(new)('new') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('ConcurrentModificationException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('next') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') CALL_EXPRESSION - DOT_QIALIFIED_EXPRESSION - DOT_QIALIFIED_EXPRESSION - PsiElement(IDENTIFIER)('ArrayList') - PsiElement(DOT)('.') - PsiElement(this)('this') - PsiElement(DOT)('.') - PsiElement(IDENTIFIER)('remove') + PsiElement(IDENTIFIER)('checkVersion') VALUE_ARGUMENT_LIST PsiElement(LPAR)('(') - VALUE_ARGUMENT - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('index') - PsiWhiteSpace(' ') - PsiElement(MINUS)('-') - PsiWhiteSpace(' ') - INTEGER_CONSTANT - PsiElement(INTEGER_LITERAL)('1') PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + IF + PsiElement(if)('if') + PsiWhiteSpace(' ') + PsiElement(LPAR)('(') + CONDITION + PsiElement(IDENTIFIER)('hasNext') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + THEN + THROW + PsiElement(throw)('throw') + PsiWhiteSpace(' ') + NEW + PsiElement(new)('new') + PsiWhiteSpace(' ') + TYPE_REFERENCE + USER_TYPE + PsiElement(IDENTIFIER)('NoMoreElementsException') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + ARRAY_ACCESS_EXPRESSION + PsiElement(IDENTIFIER)('data') + INDICES + PsiElement(LBRACKET)('[') + POSTFIX_EXPRESSION + PsiElement(IDENTIFIER)('index') + PsiElement(PLUSPLUS)('++') + PsiElement(RBRACKET)(']') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n\n ') + PROPERTY + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('hasNext') PsiWhiteSpace('\n ') - BINARY_EXPRESSION - PsiElement(IDENTIFIER)('myVersion') + PROPERTY_ACCESSOR + PsiElement(get)('get') + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('version') - PsiWhiteSpace('\n ') - PsiElement(IDENTIFIER)('result') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') - PsiWhiteSpace('\n ') - PsiElement(RBRACE)('}') + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('index') + PsiWhiteSpace(' ') + PsiElement(LT)('<') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('used') + PsiWhiteSpace('\n\n\n ') + FUN + MODIFIER_LIST + PsiElement(override)('override') + PsiWhiteSpace(' ') + PsiElement(fun)('fun') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('remove') + TYPE_PARAMETER_LIST + + VALUE_PARAMETER_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace(' ') + BLOCK + PsiElement(LBRACE)('{') + PsiWhiteSpace('\n ') + CALL_EXPRESSION + PsiElement(IDENTIFIER)('checkVersion') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + PROPERTY + PsiElement(val)('val') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('result') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + CALL_EXPRESSION + DOT_QIALIFIED_EXPRESSION + DOT_QIALIFIED_EXPRESSION + PsiElement(IDENTIFIER)('ArrayList') + PsiElement(DOT)('.') + PsiElement(this)('this') + PsiElement(DOT)('.') + PsiElement(IDENTIFIER)('remove') + VALUE_ARGUMENT_LIST + PsiElement(LPAR)('(') + VALUE_ARGUMENT + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('index') + PsiWhiteSpace(' ') + PsiElement(MINUS)('-') + PsiWhiteSpace(' ') + INTEGER_CONSTANT + PsiElement(INTEGER_LITERAL)('1') + PsiElement(RPAR)(')') + PsiWhiteSpace('\n ') + BINARY_EXPRESSION + PsiElement(IDENTIFIER)('myVersion') + PsiWhiteSpace(' ') + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + PsiElement(IDENTIFIER)('version') + PsiWhiteSpace('\n ') + PsiElement(IDENTIFIER)('result') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') + PsiWhiteSpace('\n ') + PsiElement(RBRACE)('}') PsiWhiteSpace('\n\n ') FUN MODIFIER_LIST