From 82261a2c2e2dad1023a3163cdefddff563b8b481 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Thu, 10 Mar 2011 22:29:58 +0300 Subject: [PATCH] Resolve for named infix calls and infix plus --- idea/src/org/jetbrains/jet/JetNodeTypes.java | 3 + .../lang/parsing/JetExpressionParsing.java | 28 ++- .../jet/lang/psi/JetBinaryExpression.java | 15 +- .../psi/JetBinaryExpressionWithTypeRHS.java | 16 +- .../jet/lang/psi/JetReferenceExpression.java | 26 +- .../jet/lang/resolve/BindingContext.java | 1 - .../jet/lang/resolve/BindingTraceContext.java | 10 +- .../jet/lang/types/JetTypeInferrer.java | 63 +++-- .../org/jetbrains/jet/lexer/JetTokens.java | 1 + .../plugin/JetQuickDocumentationProvider.java | 2 + idea/testData/psi/Attributes.txt | 9 +- idea/testData/psi/ByCaluses.txt | 6 +- idea/testData/psi/ControlStructures.txt | 9 +- idea/testData/psi/EOLsInComments.txt | 6 +- idea/testData/psi/FunctionCalls.txt | 15 +- idea/testData/psi/NewlinesInParentheses.txt | 21 +- idea/testData/psi/Precedence.txt | 225 +++++++++++------- idea/testData/psi/Properties.txt | 12 +- idea/testData/psi/ThisType.txt | 3 +- .../psi/TypeExpressionAmbiguities_ERR.txt | 33 ++- idea/testData/psi/When.txt | 18 +- .../psi/examples/AnonymousObjects.txt | 3 +- idea/testData/psi/examples/BinaryTree.txt | 87 ++++--- idea/testData/psi/examples/BitArith.txt | 66 +++-- idea/testData/psi/examples/Builder.txt | 3 +- idea/testData/psi/examples/Graph.txt | 3 +- idea/testData/psi/examples/LINQ.txt | 12 +- .../psi/examples/PolymorphicClassObjects.txt | 3 +- idea/testData/psi/examples/Queue.txt | 30 ++- idea/testData/psi/examples/UnionFind.txt | 21 +- .../psi/examples/collections/ArrayList.txt | 60 +++-- .../psi/examples/collections/HashMap.txt | 12 +- .../psi/examples/collections/IIterator.txt | 39 ++- .../psi/examples/collections/LinkedList.txt | 69 ++++-- .../psi/examples/collections/List.txt | 15 +- idea/testData/psi/examples/io/IOSamples.txt | 27 ++- .../examples/priorityqueues/BinaryHeap.txt | 93 +++++--- .../testData/psi/examples/util/Comparison.txt | 12 +- 38 files changed, 713 insertions(+), 364 deletions(-) diff --git a/idea/src/org/jetbrains/jet/JetNodeTypes.java b/idea/src/org/jetbrains/jet/JetNodeTypes.java index 2b546ab78dd..28858aac19d 100644 --- a/idea/src/org/jetbrains/jet/JetNodeTypes.java +++ b/idea/src/org/jetbrains/jet/JetNodeTypes.java @@ -92,7 +92,10 @@ public interface JetNodeTypes { JetNodeType BLOCK = new JetNodeType("BLOCK", JetBlockExpression.class); JetNodeType FUNCTION_LITERAL = new JetNodeType("FUNCTION_LITERAL", JetFunctionLiteralExpression.class); JetNodeType ANNOTATED_EXPRESSION = new JetNodeType("ANNOTATED_EXPRESSION", JetAnnotatedExpression.class); + JetNodeType REFERENCE_EXPRESSION = new JetNodeType("REFERENCE_EXPRESSION", JetReferenceExpression.class); + JetNodeType OPERATION_REFERENCE = new JetNodeType("OPERATION_REFERENCE", JetReferenceExpression.class); + JetNodeType THIS_EXPRESSION = new JetNodeType("THIS_EXPRESSION", JetThisExpression.class); JetNodeType BINARY_EXPRESSION = new JetNodeType("BINARY_EXPRESSION", JetBinaryExpression.class); JetNodeType BINARY_WITH_TYPE = new JetNodeType("BINARY_WITH_TYPE", JetBinaryExpressionWithTypeRHS.class); diff --git a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java index 2cb4a322844..e04979f9305 100644 --- a/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java +++ b/idea/src/org/jetbrains/jet/lang/parsing/JetExpressionParsing.java @@ -6,8 +6,7 @@ import com.intellij.psi.tree.TokenSet; import org.jetbrains.jet.JetNodeType; import org.jetbrains.jet.lexer.JetTokens; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import static org.jetbrains.jet.JetNodeTypes.*; import static org.jetbrains.jet.lexer.JetTokens.*; @@ -170,6 +169,28 @@ public class JetExpressionParsing extends AbstractJetParsing { } } + public static final TokenSet ALL_OPERATIONS; + static { + Set operations = new HashSet(); + Precedence[] values = Precedence.values(); + for (Precedence precedence : values) { + operations.addAll(Arrays.asList(precedence.getOperations().getTypes())); + } + ALL_OPERATIONS = TokenSet.create(operations.toArray(new IElementType[operations.size()])); + } + + static { + IElementType[] operations = OPERATIONS.getTypes(); + Set opSet = new HashSet(Arrays.asList(operations)); + IElementType[] usedOperations = ALL_OPERATIONS.getTypes(); + Set usedSet = new HashSet(Arrays.asList(usedOperations)); + + usedSet.removeAll(opSet); + + assert usedSet.isEmpty() : "" + usedSet; + } + + private final JetParsing myJetParsing; private TokenSet decomposerExpressionFollow = null; @@ -238,7 +259,10 @@ public class JetExpressionParsing extends AbstractJetParsing { while (!myBuilder.newlineBeforeCurrentToken() && atSet(precedence.getOperations())) { IElementType operation = tt(); + + PsiBuilder.Marker operationReference = mark(); advance(); // operation + operationReference.done(OPERATION_REFERENCE); JetNodeType resultType = precedence.parseRightHandSide(operation, this); expression.done(resultType); diff --git a/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpression.java b/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpression.java index 70fd8a3742b..4a2bc25a14b 100644 --- a/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpression.java +++ b/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpression.java @@ -4,8 +4,7 @@ import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lexer.JetToken; -import org.jetbrains.jet.lexer.JetTokens; +import org.jetbrains.jet.JetNodeTypes; /** * @author max @@ -29,7 +28,7 @@ public class JetBinaryExpression extends JetExpression { @Nullable @IfNotParsed public JetExpression getRight() { - ASTNode node = getOperationTokenNode(); + ASTNode node = getOperationReference().getNode().getTreeNext(); while (node != null) { PsiElement psi = node.getPsi(); if (psi instanceof JetExpression) { @@ -42,14 +41,8 @@ public class JetBinaryExpression extends JetExpression { } @NotNull - public ASTNode getOperationTokenNode() { - ASTNode operationNode = getNode().findChildByType(JetTokens.OPERATIONS); - assert operationNode != null; - return operationNode; + public JetReferenceExpression getOperationReference() { + return (JetReferenceExpression) findChildByType(JetNodeTypes.OPERATION_REFERENCE); } - @NotNull - public JetToken getOperationSign() { - return (JetToken) getOperationTokenNode().getElementType(); - } } diff --git a/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpressionWithTypeRHS.java b/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpressionWithTypeRHS.java index ec0a2dbd041..028e7817f77 100644 --- a/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpressionWithTypeRHS.java +++ b/idea/src/org/jetbrains/jet/lang/psi/JetBinaryExpressionWithTypeRHS.java @@ -4,8 +4,7 @@ import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lexer.JetToken; -import org.jetbrains.jet.lexer.JetTokens; +import org.jetbrains.jet.JetNodeTypes; /** * @author max @@ -29,7 +28,7 @@ public class JetBinaryExpressionWithTypeRHS extends JetExpression { @Nullable @IfNotParsed public JetTypeReference getRight() { - ASTNode node = getOperationTokenNode(); + ASTNode node = getOperationReference().getNode(); while (node != null) { PsiElement psi = node.getPsi(); if (psi instanceof JetTypeReference) { @@ -40,16 +39,9 @@ public class JetBinaryExpressionWithTypeRHS extends JetExpression { return null; } - @NotNull - public ASTNode getOperationTokenNode() { - ASTNode operationNode = getNode().findChildByType(JetTokens.OPERATIONS); - assert operationNode != null; - return operationNode; + public JetReferenceExpression getOperationReference() { + return (JetReferenceExpression) findChildByType(JetNodeTypes.OPERATION_REFERENCE); } - @NotNull - public JetToken getOperationSign() { - return (JetToken) getOperationTokenNode().getElementType(); - } } diff --git a/idea/src/org/jetbrains/jet/lang/psi/JetReferenceExpression.java b/idea/src/org/jetbrains/jet/lang/psi/JetReferenceExpression.java index 923c6185e23..b171f67e550 100644 --- a/idea/src/org/jetbrains/jet/lang/psi/JetReferenceExpression.java +++ b/idea/src/org/jetbrains/jet/lang/psi/JetReferenceExpression.java @@ -4,12 +4,14 @@ import com.intellij.lang.ASTNode; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiReference; +import com.intellij.psi.tree.IElementType; import com.intellij.psi.tree.TokenSet; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.ErrorHandler; +import org.jetbrains.jet.lang.parsing.JetExpressionParsing; import org.jetbrains.jet.lang.resolve.AnalyzingUtils; import org.jetbrains.jet.lang.resolve.BindingContext; import org.jetbrains.jet.lexer.JetTokens; @@ -26,18 +28,23 @@ public class JetReferenceExpression extends JetExpression { @Nullable @IfNotParsed public String getReferencedName() { - ASTNode node = getNode().findChildByType(REFERENCE_TOKENS); - return node == null ? null : node.getText(); + PsiElement referencedNameElement = getReferencedNameElement(); + return referencedNameElement == null ? null : referencedNameElement.getNode().getText(); } @Nullable @IfNotParsed public PsiElement getReferencedNameElement() { - return findChildByType(REFERENCE_TOKENS); + PsiElement element = findChildByType(REFERENCE_TOKENS); + if (element == null) { + element = findChildByType(JetExpressionParsing.ALL_OPERATIONS); + } + return element; } - @Override - public void accept(JetVisitor visitor) { - visitor.visitReferenceExpression(this); + @Nullable @IfNotParsed + public IElementType getReferencedNameElementType() { + PsiElement element = getReferencedNameElement(); + return element == null ? null : element.getNode().getElementType(); } @Override @@ -51,7 +58,7 @@ public class JetReferenceExpression extends JetExpression { return new PsiReference() { @Override public PsiElement getElement() { - return findChildByType(REFERENCE_TOKENS); + return getReferencedNameElement(); } @Override @@ -104,4 +111,9 @@ public class JetReferenceExpression extends JetExpression { }; } + @Override + public void accept(JetVisitor visitor) { + visitor.visitReferenceExpression(this); + } + } diff --git a/idea/src/org/jetbrains/jet/lang/resolve/BindingContext.java b/idea/src/org/jetbrains/jet/lang/resolve/BindingContext.java index 8eae53291bb..d4057a0ed2e 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/BindingContext.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/BindingContext.java @@ -17,7 +17,6 @@ public interface BindingContext { JetScope getTopLevelScope(); - DeclarationDescriptor resolveReferenceExpression(JetReferenceExpression referenceExpression); Type resolveTypeReference(JetTypeReference typeReference); diff --git a/idea/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java b/idea/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java index 29a3764b904..b8767b2978c 100644 --- a/idea/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java +++ b/idea/src/org/jetbrains/jet/lang/resolve/BindingTraceContext.java @@ -38,8 +38,8 @@ public class BindingTraceContext extends BindingTrace implements BindingContext @Override public void recordDeclarationResolution(@NotNull PsiElement declaration, @NotNull DeclarationDescriptor descriptor) { - descriptorToDeclarations.put(descriptor, declaration); - declarationsToDescriptors.put(declaration, descriptor); + descriptorToDeclarations.put(descriptor.getOriginal(), declaration); + declarationsToDescriptors.put(declaration, descriptor.getOriginal()); } public void setToplevelScope(JetScope toplevelScope) { @@ -89,7 +89,11 @@ public class BindingTraceContext extends BindingTrace implements BindingContext @Override public PsiElement resolveToDeclarationPsiElement(JetReferenceExpression referenceExpression) { - return descriptorToDeclarations.get(resolveReferenceExpression(referenceExpression)); + DeclarationDescriptor declarationDescriptor = resolveReferenceExpression(referenceExpression); + if (declarationDescriptor == null) { + return null; + } + return descriptorToDeclarations.get(declarationDescriptor.getOriginal()); } } diff --git a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java index ae8c9a2030f..8424963a96c 100644 --- a/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java +++ b/idea/src/org/jetbrains/jet/lang/types/JetTypeInferrer.java @@ -167,7 +167,7 @@ public class JetTypeInferrer { @Override public void visitBinaryWithTypeRHSExpression(JetBinaryExpressionWithTypeRHS expression) { - if (expression.getOperationSign() == JetTokens.COLON) { + if (expression.getOperationReference().getReferencedNameElementType() == JetTokens.COLON) { Type actualType = getType(scope, expression.getLeft(), false); Type expectedType = typeResolver.resolveType(scope, expression.getRight()); if (JetTypeChecker.INSTANCE.isSubtypeOf(actualType, expectedType)) { @@ -316,6 +316,12 @@ public class JetTypeInferrer { // result[0] = overloadDomain.getFunctionDescriptorForNamedArguments(typeArguments, valueArguments, functionLiteralArgument); } else { + List types = new ArrayList(); + for (JetTypeProjection projection : typeArguments) { + // TODO : check that there's no projection + types.add(typeResolver.resolveType(scope, projection.getTypeReference())); + } + List positionedValueArguments = new ArrayList(); for (JetArgument argument : valueArguments) { positionedValueArguments.add(argument.getArgumentExpression()); @@ -323,12 +329,6 @@ public class JetTypeInferrer { positionedValueArguments.addAll(functionLiteralArguments); - List types = new ArrayList(); - for (JetTypeProjection projection : typeArguments) { - // TODO : check that there's no projection - types.add(typeResolver.resolveType(scope, projection.getTypeReference())); - } - List valueArgumentTypes = new ArrayList(); for (JetExpression valueArgument : positionedValueArguments) { valueArgumentTypes.add(getType(scope, valueArgument, false)); @@ -341,10 +341,40 @@ public class JetTypeInferrer { } } + @Override + public void visitBinaryExpression(JetBinaryExpression expression) { + JetReferenceExpression operationSign = expression.getOperationReference(); + + IElementType operationType = operationSign.getReferencedNameElementType(); + if (operationType == JetTokens.IDENTIFIER) { + result[0] = getTypeForBinaryCall(expression, operationSign.getReferencedName(), scope); + } + else if (operationType == JetTokens.PLUS) { + result[0] = getTypeForBinaryCall(expression, "plus", scope); + } else { + throw new UnsupportedOperationException(); // TODO + } + } + @Override public void visitJetElement(JetElement elem) { throw new IllegalArgumentException("Unsupported element: " + elem); } + + private Type getTypeForBinaryCall(JetBinaryExpression expression, String name, JetScope scope) { + JetReferenceExpression operationSign = expression.getOperationReference(); + JetExpression left = expression.getLeft(); + Type leftType = getType(scope, left, false); + JetExpression right = expression.getRight(); + Type rightType = getType(scope, right, false); + OverloadDomain overloadDomain = OverloadResolver.INSTANCE.getOverloadDomain(leftType, scope, name); + overloadDomain = wrapForTracing(overloadDomain, operationSign); + FunctionDescriptor functionDescriptor = overloadDomain.getFunctionDescriptorForPositionedArguments(Collections.emptyList(), Collections.singletonList(rightType)); + if (functionDescriptor != null) { + return functionDescriptor.getUnsubstitutedReturnType(); + } + return null; + } }); if (result[0] != null) { trace.recordExpressionType(expression, result[0]); @@ -352,6 +382,7 @@ public class JetTypeInferrer { return result[0]; } + private OverloadDomain getOverloadDomain(final JetScope scope, JetExpression calleeExpression) { final OverloadDomain[] result = new OverloadDomain[1]; final JetReferenceExpression[] reference = new JetReferenceExpression[1]; @@ -404,26 +435,30 @@ public class JetTypeInferrer { throw new IllegalArgumentException("Unsupported element: " + elem); } }); - if (result[0] == null) return OverloadDomain.EMPTY; + return wrapForTracing(result[0], reference[0]); + } + + private OverloadDomain wrapForTracing(final OverloadDomain overloadDomain, final JetReferenceExpression referenceExpression) { + if (overloadDomain == null) return OverloadDomain.EMPTY; return new OverloadDomain() { @Override public FunctionDescriptor getFunctionDescriptorForNamedArguments(@NotNull List typeArguments, @NotNull Map valueArgumentTypes, @Nullable Type functionLiteralArgumentType) { - FunctionDescriptor descriptor = result[0].getFunctionDescriptorForNamedArguments(typeArguments, valueArgumentTypes, functionLiteralArgumentType); + FunctionDescriptor descriptor = overloadDomain.getFunctionDescriptorForNamedArguments(typeArguments, valueArgumentTypes, functionLiteralArgumentType); if (descriptor != null) { - trace.recordReferenceResolution(reference[0], descriptor); + trace.recordReferenceResolution(referenceExpression, descriptor); } else { - semanticServices.getErrorHandler().unresolvedReference(reference[0]); + semanticServices.getErrorHandler().unresolvedReference(referenceExpression); } return descriptor; } @Override public FunctionDescriptor getFunctionDescriptorForPositionedArguments(@NotNull List typeArguments, @NotNull List positionedValueArgumentTypes) { - FunctionDescriptor descriptor = result[0].getFunctionDescriptorForPositionedArguments(typeArguments, positionedValueArgumentTypes); + FunctionDescriptor descriptor = overloadDomain.getFunctionDescriptorForPositionedArguments(typeArguments, positionedValueArgumentTypes); if (descriptor != null) { - trace.recordReferenceResolution(reference[0], descriptor); + trace.recordReferenceResolution(referenceExpression, descriptor); } else { - semanticServices.getErrorHandler().unresolvedReference(reference[0]); + semanticServices.getErrorHandler().unresolvedReference(referenceExpression); } return descriptor; } diff --git a/idea/src/org/jetbrains/jet/lexer/JetTokens.java b/idea/src/org/jetbrains/jet/lexer/JetTokens.java index 0dfb6febc87..413f9e0ce61 100644 --- a/idea/src/org/jetbrains/jet/lexer/JetTokens.java +++ b/idea/src/org/jetbrains/jet/lexer/JetTokens.java @@ -6,6 +6,7 @@ package org.jetbrains.jet.lexer; import com.intellij.psi.TokenType; import com.intellij.psi.tree.IElementType; import com.intellij.psi.tree.TokenSet; +import org.jetbrains.jet.lang.parsing.JetExpressionParsing; public interface JetTokens { JetToken EOF = new JetToken("EOF"); diff --git a/idea/src/org/jetbrains/jet/plugin/JetQuickDocumentationProvider.java b/idea/src/org/jetbrains/jet/plugin/JetQuickDocumentationProvider.java index 66ee888cded..c342b59cb48 100644 --- a/idea/src/org/jetbrains/jet/plugin/JetQuickDocumentationProvider.java +++ b/idea/src/org/jetbrains/jet/plugin/JetQuickDocumentationProvider.java @@ -31,4 +31,6 @@ public class JetQuickDocumentationProvider extends QuickDocumentationProvider { } return "Not a reference"; } + + } diff --git a/idea/testData/psi/Attributes.txt b/idea/testData/psi/Attributes.txt index ee7b2874f6e..7b44d281358 100644 --- a/idea/testData/psi/Attributes.txt +++ b/idea/testData/psi/Attributes.txt @@ -171,7 +171,8 @@ JetFile: Attributes.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(COMMA)(',') @@ -194,7 +195,8 @@ JetFile: Attributes.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RBRACKET)(']') @@ -220,7 +222,8 @@ JetFile: Attributes.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RBRACKET)(']') diff --git a/idea/testData/psi/ByCaluses.txt b/idea/testData/psi/ByCaluses.txt index e10f59bf162..f9938af1ca2 100644 --- a/idea/testData/psi/ByCaluses.txt +++ b/idea/testData/psi/ByCaluses.txt @@ -58,7 +58,8 @@ JetFile: ByCaluses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') BINARY_EXPRESSION CALL_EXPRESSION @@ -68,7 +69,8 @@ JetFile: ByCaluses.jet PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('5') diff --git a/idea/testData/psi/ControlStructures.txt b/idea/testData/psi/ControlStructures.txt index 324d58bf8d7..f10aa833c1d 100644 --- a/idea/testData/psi/ControlStructures.txt +++ b/idea/testData/psi/ControlStructures.txt @@ -676,7 +676,8 @@ JetFile: ControlStructures.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(in)('in') + OPERATION_REFERENCE + PsiElement(in)('in') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -695,7 +696,8 @@ JetFile: ControlStructures.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(in)('in') + OPERATION_REFERENCE + PsiElement(in)('in') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -720,7 +722,8 @@ JetFile: ControlStructures.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(in)('in') + OPERATION_REFERENCE + PsiElement(in)('in') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') diff --git a/idea/testData/psi/EOLsInComments.txt b/idea/testData/psi/EOLsInComments.txt index 701fd3e9d1e..126952c17dd 100644 --- a/idea/testData/psi/EOLsInComments.txt +++ b/idea/testData/psi/EOLsInComments.txt @@ -48,7 +48,8 @@ JetFile: EOLsInComments.jet PsiWhiteSpace(' ') PsiComment(BLOCK_COMMENT)('/*\n */') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -70,7 +71,8 @@ JetFile: EOLsInComments.jet PsiWhiteSpace(' ') PsiComment(DOC_COMMENT)('/**\n */') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') diff --git a/idea/testData/psi/FunctionCalls.txt b/idea/testData/psi/FunctionCalls.txt index e976558e048..a4c43ab3dac 100644 --- a/idea/testData/psi/FunctionCalls.txt +++ b/idea/testData/psi/FunctionCalls.txt @@ -252,7 +252,8 @@ JetFile: FunctionCalls.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -266,7 +267,8 @@ JetFile: FunctionCalls.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -283,7 +285,8 @@ JetFile: FunctionCalls.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -295,7 +298,8 @@ JetFile: FunctionCalls.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') @@ -306,7 +310,8 @@ JetFile: FunctionCalls.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION diff --git a/idea/testData/psi/NewlinesInParentheses.txt b/idea/testData/psi/NewlinesInParentheses.txt index fe8cf6fa614..06858ad1f55 100644 --- a/idea/testData/psi/NewlinesInParentheses.txt +++ b/idea/testData/psi/NewlinesInParentheses.txt @@ -24,7 +24,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -40,7 +41,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace('\n ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -74,7 +76,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace('\n ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -126,7 +129,8 @@ JetFile: NewlinesInParentheses.jet PsiElement(IDENTIFIER)('b') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -148,7 +152,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') PsiWhiteSpace('\n ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('d') @@ -206,7 +211,8 @@ JetFile: NewlinesInParentheses.jet PsiElement(IDENTIFIER)('d') PsiElement(RBRACE)('}') PsiWhiteSpace('\n ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('d') @@ -322,7 +328,8 @@ JetFile: NewlinesInParentheses.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(is)('is') + OPERATION_REFERENCE + PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN TYPE_REFERENCE diff --git a/idea/testData/psi/Precedence.txt b/idea/testData/psi/Precedence.txt index 7fd2cae2f78..a4226bb230e 100644 --- a/idea/testData/psi/Precedence.txt +++ b/idea/testData/psi/Precedence.txt @@ -95,7 +95,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -109,7 +110,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -126,7 +128,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -138,7 +141,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -149,7 +153,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -166,7 +171,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -177,7 +183,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -229,7 +236,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(RPAR)(')') @@ -239,7 +247,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -256,7 +265,8 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -270,7 +280,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -279,13 +290,15 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -294,7 +307,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') PARENTHESIZED PsiElement(LPAR)('(') @@ -302,7 +316,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -315,13 +330,15 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -331,18 +348,21 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -352,18 +372,21 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(in)('in') + OPERATION_REFERENCE + PsiElement(in)('in') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('d') @@ -379,7 +402,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -396,7 +420,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -427,7 +452,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') @@ -436,14 +462,17 @@ JetFile: Precedence.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace('\n ') @@ -451,16 +480,19 @@ JetFile: Precedence.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('3') PsiWhiteSpace('\n ') @@ -469,18 +501,21 @@ JetFile: Precedence.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('foo') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(ELVIS)('?:') + OPERATION_REFERENCE + PsiElement(ELVIS)('?:') PsiWhiteSpace(' ') BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('bar') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('bar') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('3') @@ -491,17 +526,20 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('b') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('d') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('d') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('e') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('f') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('f') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('g') @@ -511,17 +549,20 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(ELVIS)('?:') + OPERATION_REFERENCE + PsiElement(ELVIS)('?:') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(in)('in') + OPERATION_REFERENCE + PsiElement(in)('in') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(ELVIS)('?:') + OPERATION_REFERENCE + PsiElement(ELVIS)('?:') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -533,7 +574,8 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + OPERATION_REFERENCE + PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -541,13 +583,15 @@ JetFile: Precedence.jet PsiElement(IDENTIFIER)('b') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') BINARY_WITH_TYPE REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + OPERATION_REFERENCE + PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -559,18 +603,21 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -580,12 +627,14 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(ANDAND)('&&') + OPERATION_REFERENCE + PsiElement(ANDAND)('&&') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') @@ -594,43 +643,49 @@ JetFile: Precedence.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(OROR)('||') - PsiWhiteSpace(' ') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(ANDAND)('&&') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n ') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') - PsiElement(ARROW)('->') - PsiWhiteSpace(' ') - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('c') - PsiWhiteSpace('\n ') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('a') - PsiWhiteSpace(' ') - PsiElement(EQ)('=') - PsiWhiteSpace(' ') - BINARY_EXPRESSION - REFERENCE_EXPRESSION - PsiElement(IDENTIFIER)('b') - PsiWhiteSpace(' ') + OPERATION_REFERENCE PsiElement(OROR)('||') + PsiWhiteSpace(' ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(ANDAND)('&&') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(ARROW)('->') + PsiWhiteSpace(' ') + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('c') + PsiWhiteSpace('\n ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('a') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(EQ)('=') + PsiWhiteSpace(' ') + BINARY_EXPRESSION + REFERENCE_EXPRESSION + PsiElement(IDENTIFIER)('b') + PsiWhiteSpace(' ') + OPERATION_REFERENCE + PsiElement(OROR)('||') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') diff --git a/idea/testData/psi/Properties.txt b/idea/testData/psi/Properties.txt index 881ea58f099..1d0013756f3 100644 --- a/idea/testData/psi/Properties.txt +++ b/idea/testData/psi/Properties.txt @@ -694,7 +694,8 @@ JetFile: Properties.jet PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('5') @@ -710,7 +711,8 @@ JetFile: Properties.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('int') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + OPERATION_REFERENCE + PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -718,7 +720,8 @@ JetFile: Properties.jet PsiElement(IDENTIFIER)('x') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('5') @@ -765,7 +768,8 @@ JetFile: Properties.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') \ No newline at end of file diff --git a/idea/testData/psi/ThisType.txt b/idea/testData/psi/ThisType.txt index 9351f37ffca..878ae5222f7 100644 --- a/idea/testData/psi/ThisType.txt +++ b/idea/testData/psi/ThisType.txt @@ -75,7 +75,8 @@ JetFile: ThisType.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('foo') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE diff --git a/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt b/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt index d8d217be244..1f37b714269 100644 --- a/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt +++ b/idea/testData/psi/TypeExpressionAmbiguities_ERR.txt @@ -61,7 +61,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -70,7 +71,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(COMMA)(',') @@ -79,7 +81,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -96,7 +99,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -114,7 +118,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -131,7 +136,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bar') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiElement(COMMA)(',') @@ -141,7 +147,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + OPERATION_REFERENCE + PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -153,7 +160,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('c') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PARENTHESIZED PsiElement(LPAR)('(') REFERENCE_EXPRESSION @@ -165,7 +173,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(COLON)(':') + OPERATION_REFERENCE + PsiElement(COLON)(':') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -187,7 +196,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('d') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -209,7 +219,8 @@ JetFile: TypeExpressionAmbiguities_ERR.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(is)('is') + OPERATION_REFERENCE + PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN TYPE_REFERENCE diff --git a/idea/testData/psi/When.txt b/idea/testData/psi/When.txt index 36eaa97603a..dcf0152027d 100644 --- a/idea/testData/psi/When.txt +++ b/idea/testData/psi/When.txt @@ -209,7 +209,8 @@ JetFile: When.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('5') @@ -772,7 +773,8 @@ JetFile: When.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') @@ -916,7 +918,8 @@ JetFile: When.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiElement(COMMA)(',') @@ -1171,7 +1174,8 @@ JetFile: When.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('3') @@ -1247,13 +1251,15 @@ JetFile: When.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('3') diff --git a/idea/testData/psi/examples/AnonymousObjects.txt b/idea/testData/psi/examples/AnonymousObjects.txt index df51c6afd3e..dfe32c19ecc 100644 --- a/idea/testData/psi/examples/AnonymousObjects.txt +++ b/idea/testData/psi/examples/AnonymousObjects.txt @@ -89,7 +89,8 @@ JetFile: AnonymousObjects.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('clickCount') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('3') diff --git a/idea/testData/psi/examples/BinaryTree.txt b/idea/testData/psi/examples/BinaryTree.txt index 5ca93f0d61e..90693bcb436 100644 --- a/idea/testData/psi/examples/BinaryTree.txt +++ b/idea/testData/psi/examples/BinaryTree.txt @@ -185,7 +185,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -393,7 +394,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -639,7 +641,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -654,7 +657,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -815,7 +819,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -830,7 +835,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -914,7 +920,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -933,7 +940,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -998,7 +1006,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -1017,7 +1026,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -1131,7 +1141,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('toRemove') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -1208,7 +1219,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -1530,7 +1542,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -1595,7 +1608,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') @@ -1610,7 +1624,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') @@ -1637,7 +1652,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') @@ -1660,7 +1676,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') @@ -1687,7 +1704,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('node') @@ -1710,7 +1728,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('replace') @@ -1774,7 +1793,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -1975,7 +1995,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('root') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -2054,7 +2075,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -2163,7 +2185,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('left') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -2228,7 +2251,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -2308,7 +2332,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('right') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -2383,7 +2408,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('isEmpty') PsiWhiteSpace(' ') - PsiElement(OROR)('||') + OPERATION_REFERENCE + PsiElement(OROR)('||') PsiWhiteSpace(' ') PREFIX_EXPRESSION PsiElement(EXCL)('!') @@ -2426,7 +2452,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastNode') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -2473,7 +2500,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') @@ -2505,7 +2533,8 @@ JetFile: BinaryTree.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION diff --git a/idea/testData/psi/examples/BitArith.txt b/idea/testData/psi/examples/BitArith.txt index defca95cab4..8773a8a513e 100644 --- a/idea/testData/psi/examples/BitArith.txt +++ b/idea/testData/psi/examples/BitArith.txt @@ -25,7 +25,8 @@ JetFile: BitArith.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('shl') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('shl') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') @@ -66,7 +67,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('or') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('or') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -114,7 +116,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('and') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -170,7 +173,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('and') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -182,7 +186,8 @@ JetFile: BitArith.jet PsiElement(IDENTIFIER)('index') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -227,18 +232,21 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('shr') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('shr') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('shl') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('shl') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('31') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -284,7 +292,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -299,13 +308,15 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('result') PsiWhiteSpace(' ') - PsiElement(PLUSEQ)('+=') + OPERATION_REFERENCE + PsiElement(PLUSEQ)('+=') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('and') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -314,13 +325,15 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('ushr') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('ushr') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -361,7 +374,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('and') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -377,19 +391,22 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('bits') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -426,7 +443,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -450,7 +468,8 @@ JetFile: BitArith.jet PsiElement(IDENTIFIER)('x') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -462,7 +481,8 @@ JetFile: BitArith.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('shl') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('shl') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -499,12 +519,14 @@ JetFile: BitArith.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('and') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('and') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('mask') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('mask') diff --git a/idea/testData/psi/examples/Builder.txt b/idea/testData/psi/examples/Builder.txt index afbad7a046a..4197c67f63c 100644 --- a/idea/testData/psi/examples/Builder.txt +++ b/idea/testData/psi/examples/Builder.txt @@ -157,7 +157,8 @@ JetFile: Builder.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('targetLevel') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') STRING_CONSTANT PsiElement(STRING_LITERAL)('"1.5"') diff --git a/idea/testData/psi/examples/Graph.txt b/idea/testData/psi/examples/Graph.txt index a49150b0b73..babf61a5d27 100644 --- a/idea/testData/psi/examples/Graph.txt +++ b/idea/testData/psi/examples/Graph.txt @@ -455,7 +455,8 @@ JetFile: Graph.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('v') diff --git a/idea/testData/psi/examples/LINQ.txt b/idea/testData/psi/examples/LINQ.txt index 70acc89ba38..34dd2155cfa 100644 --- a/idea/testData/psi/examples/LINQ.txt +++ b/idea/testData/psi/examples/LINQ.txt @@ -19,7 +19,8 @@ JetFile: LINQ.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('l') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('filter') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('filter') PsiWhiteSpace(' ') FUNCTION_LITERAL PsiElement(LBRACE)('{') @@ -32,7 +33,8 @@ JetFile: LINQ.jet PsiElement(IDENTIFIER)('x') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('map') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('map') PsiWhiteSpace(' ') FUNCTION_LITERAL PsiElement(LBRACE)('{') @@ -45,7 +47,8 @@ JetFile: LINQ.jet PsiElement(IDENTIFIER)('foo') PsiElement(RBRACE)('}') PsiWhiteSpace(' ') - PsiElement(IDENTIFIER)('aggregate') + OPERATION_REFERENCE + PsiElement(IDENTIFIER)('aggregate') PsiWhiteSpace(' ') FUNCTION_LITERAL PsiElement(LBRACE)('{') @@ -66,7 +69,8 @@ JetFile: LINQ.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') diff --git a/idea/testData/psi/examples/PolymorphicClassObjects.txt b/idea/testData/psi/examples/PolymorphicClassObjects.txt index 4b3ed00c572..64dd5069e0f 100644 --- a/idea/testData/psi/examples/PolymorphicClassObjects.txt +++ b/idea/testData/psi/examples/PolymorphicClassObjects.txt @@ -377,7 +377,8 @@ JetFile: PolymorphicClassObjects.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('builder') PsiWhiteSpace(' ') - PsiElement(PLUSEQ)('+=') + OPERATION_REFERENCE + PsiElement(PLUSEQ)('+=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/Queue.txt b/idea/testData/psi/examples/Queue.txt index 8da89f4eab1..03cef38354f 100644 --- a/idea/testData/psi/examples/Queue.txt +++ b/idea/testData/psi/examples/Queue.txt @@ -189,7 +189,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -204,7 +205,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('i') @@ -213,7 +215,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') @@ -235,7 +238,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('i') @@ -244,7 +248,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('i') @@ -277,7 +282,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -323,7 +329,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -341,7 +348,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -352,7 +360,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -381,7 +390,8 @@ JetFile: Queue.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') NULL PsiElement(null)('null') diff --git a/idea/testData/psi/examples/UnionFind.txt b/idea/testData/psi/examples/UnionFind.txt index 769c7dfb7f7..504d4a5e981 100644 --- a/idea/testData/psi/examples/UnionFind.txt +++ b/idea/testData/psi/examples/UnionFind.txt @@ -146,7 +146,8 @@ JetFile: UnionFind.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('p') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('x') @@ -194,7 +195,8 @@ JetFile: UnionFind.jet PsiElement(IDENTIFIER)('x') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('result') @@ -278,7 +280,8 @@ JetFile: UnionFind.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pa') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pb') @@ -325,7 +328,8 @@ JetFile: UnionFind.jet PsiElement(IDENTIFIER)('pb') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pa') @@ -349,7 +353,8 @@ JetFile: UnionFind.jet PsiElement(IDENTIFIER)('pa') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('pb') @@ -391,12 +396,14 @@ JetFile: UnionFind.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(PERC)('%') + OPERATION_REFERENCE + PsiElement(PERC)('%') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') \ No newline at end of file diff --git a/idea/testData/psi/examples/collections/ArrayList.txt b/idea/testData/psi/examples/collections/ArrayList.txt index d2280e1a28c..64d5b258241 100644 --- a/idea/testData/psi/examples/collections/ArrayList.txt +++ b/idea/testData/psi/examples/collections/ArrayList.txt @@ -212,7 +212,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('myVersion') @@ -314,7 +315,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') @@ -367,7 +369,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -377,7 +380,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('myVersion') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('version') @@ -469,7 +473,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') @@ -514,7 +519,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -609,7 +615,8 @@ JetFile: ArrayList.jet PsiElement(IDENTIFIER)('index') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') @@ -665,7 +672,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -680,7 +688,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') @@ -703,7 +712,8 @@ JetFile: ArrayList.jet PsiElement(PLUSPLUS)('++') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') @@ -722,7 +732,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') @@ -747,10 +758,12 @@ JetFile: ArrayList.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiElement(RPAR)(')') @@ -768,13 +781,15 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('i') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') ARRAY_ACCESS_EXPRESSION REFERENCE_EXPRESSION @@ -795,7 +810,8 @@ JetFile: ArrayList.jet PsiElement(IDENTIFIER)('index') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') @@ -863,11 +879,13 @@ JetFile: ArrayList.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('used') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RPAR)(')') @@ -883,7 +901,8 @@ JetFile: ArrayList.jet PsiElement(IDENTIFIER)('i') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') ARRAY_ACCESS_EXPRESSION REFERENCE_EXPRESSION @@ -894,7 +913,8 @@ JetFile: ArrayList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('i') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') diff --git a/idea/testData/psi/examples/collections/HashMap.txt b/idea/testData/psi/examples/collections/HashMap.txt index bb863e7c19a..b713f990693 100644 --- a/idea/testData/psi/examples/collections/HashMap.txt +++ b/idea/testData/psi/examples/collections/HashMap.txt @@ -49,7 +49,8 @@ JetFile: HashMap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -74,7 +75,8 @@ JetFile: HashMap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('other') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -141,7 +143,8 @@ JetFile: HashMap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -889,7 +892,8 @@ JetFile: HashMap.jet PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') diff --git a/idea/testData/psi/examples/collections/IIterator.txt b/idea/testData/psi/examples/collections/IIterator.txt index da96d6b3d7d..2cbb1fbc055 100644 --- a/idea/testData/psi/examples/collections/IIterator.txt +++ b/idea/testData/psi/examples/collections/IIterator.txt @@ -195,18 +195,21 @@ JetFile: IIterator.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace(' ') - PsiElement(OROR)('||') + OPERATION_REFERENCE + PsiElement(OROR)('||') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -215,24 +218,28 @@ JetFile: IIterator.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('lastIndex') PsiWhiteSpace(' ') - PsiElement(OROR)('||') + OPERATION_REFERENCE + PsiElement(OROR)('||') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('length') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') PsiWhiteSpace(' ') - PsiElement(OROR)('||') + OPERATION_REFERENCE + PsiElement(OROR)('||') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('length') PsiWhiteSpace(' ') - PsiElement(GT)('>') + OPERATION_REFERENCE + PsiElement(GT)('>') PsiWhiteSpace(' ') BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION @@ -242,7 +249,8 @@ JetFile: IIterator.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') @@ -275,7 +283,8 @@ JetFile: IIterator.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('len') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -313,19 +322,22 @@ JetFile: IIterator.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') PsiWhiteSpace(' ') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') PsiWhiteSpace(' ') BINARY_EXPRESSION BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('from') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('length') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -364,7 +376,8 @@ JetFile: IIterator.jet PsiElement(IDENTIFIER)('i') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/collections/LinkedList.txt b/idea/testData/psi/examples/collections/LinkedList.txt index 2caea468a99..511230f0ee7 100644 --- a/idea/testData/psi/examples/collections/LinkedList.txt +++ b/idea/testData/psi/examples/collections/LinkedList.txt @@ -217,7 +217,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -236,7 +237,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') @@ -245,7 +247,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('newItem') @@ -259,7 +262,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQEQEQ)('===') + OPERATION_REFERENCE + PsiElement(EQEQEQ)('===') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -274,7 +278,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') @@ -315,7 +320,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -332,7 +338,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('newItem') @@ -346,7 +353,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQEQEQ)('===') + OPERATION_REFERENCE + PsiElement(EQEQEQ)('===') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('insertAfter') @@ -361,7 +369,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('newItem') @@ -406,16 +415,19 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiWhiteSpace(' ') - PsiElement(NOT_IN)('!in') + OPERATION_REFERENCE + PsiElement(NOT_IN)('!in') PsiWhiteSpace(' ') BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RPAR)(')') @@ -510,7 +522,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('item') PsiWhiteSpace(' ') - PsiElement(EQEQEQ)('===') + OPERATION_REFERENCE + PsiElement(EQEQEQ)('===') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') @@ -525,7 +538,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -543,7 +557,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('head') PsiWhiteSpace(' ') - PsiElement(EQEQEQ)('===') + OPERATION_REFERENCE + PsiElement(EQEQEQ)('===') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -553,7 +568,8 @@ JetFile: LinkedList.jet BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -579,7 +595,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -601,7 +618,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQEQEQ)('===') + OPERATION_REFERENCE + PsiElement(EQEQEQ)('===') PsiWhiteSpace(' ') NULL PsiElement(null)('null') @@ -624,7 +642,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('previous') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -646,7 +665,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('tail') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -768,7 +788,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') @@ -829,7 +850,8 @@ JetFile: LinkedList.jet BINARY_EXPRESSION INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('index') PsiElement(RPAR)(')') @@ -843,7 +865,8 @@ JetFile: LinkedList.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('result') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/collections/List.txt b/idea/testData/psi/examples/collections/List.txt index 1d578284de5..3477235ebf8 100644 --- a/idea/testData/psi/examples/collections/List.txt +++ b/idea/testData/psi/examples/collections/List.txt @@ -142,7 +142,8 @@ JetFile: List.jet INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -203,7 +204,8 @@ JetFile: List.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Nil') @@ -277,13 +279,15 @@ JetFile: List.jet PsiElement(LPAR)('(') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('current') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('Nil') @@ -324,7 +328,8 @@ JetFile: List.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('current') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/io/IOSamples.txt b/idea/testData/psi/examples/io/IOSamples.txt index 32887ace2a6..c6e02360e2d 100644 --- a/idea/testData/psi/examples/io/IOSamples.txt +++ b/idea/testData/psi/examples/io/IOSamples.txt @@ -316,7 +316,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('stream') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -368,7 +369,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('nextUsed') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(true)('true') @@ -380,7 +382,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -421,13 +424,15 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('nextUsed') PsiWhiteSpace(' ') - PsiElement(ANDAND)('&&') + OPERATION_REFERENCE + PsiElement(ANDAND)('&&') PsiWhiteSpace(' ') BINARY_EXPRESSION REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') PREFIX_EXPRESSION PsiElement(MINUS)('-') @@ -444,7 +449,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('nextUsed') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') BOOLEAN_CONSTANT PsiElement(false)('false') @@ -453,7 +459,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION DOT_QIALIFIED_EXPRESSION @@ -477,7 +484,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('next') PsiWhiteSpace(' ') - PsiElement(EXCLEQ)('!=') + OPERATION_REFERENCE + PsiElement(EXCLEQ)('!=') PsiWhiteSpace(' ') PREFIX_EXPRESSION PsiElement(MINUS)('-') @@ -574,7 +582,8 @@ JetFile: IOSamples.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('stream') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION diff --git a/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt b/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt index 5ffb45c26ef..07d152c1274 100644 --- a/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt +++ b/idea/testData/psi/examples/priorityqueues/BinaryHeap.txt @@ -143,7 +143,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') @@ -156,7 +157,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('data') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -191,12 +193,14 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiWhiteSpace(' ') - PsiElement(DIV)('/') + OPERATION_REFERENCE + PsiElement(DIV)('/') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(RANGE)('..') + OPERATION_REFERENCE + PsiElement(RANGE)('..') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -255,7 +259,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('compare') @@ -268,7 +273,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('data') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -296,7 +302,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('data') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -315,7 +322,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('T') PsiWhiteSpace(' ') - PsiElement(is)('is') + OPERATION_REFERENCE + PsiElement(is)('is') PsiWhiteSpace(' ') TYPE_PATTERN TYPE_REFERENCE @@ -340,7 +348,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('comparator') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') CALL_EXPRESSION REFERENCE_EXPRESSION @@ -595,7 +604,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -614,7 +624,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -642,7 +653,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('exists') PsiWhiteSpace(' ') - PsiElement(ANDAND)('&&') + OPERATION_REFERENCE + PsiElement(ANDAND)('&&') PsiWhiteSpace(' ') BINARY_EXPRESSION DOT_QIALIFIED_EXPRESSION @@ -656,7 +668,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -675,7 +688,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -695,7 +709,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('current') @@ -728,7 +743,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('current') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('min') @@ -826,7 +842,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION DOT_QIALIFIED_EXPRESSION @@ -872,7 +889,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('current') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -933,13 +951,15 @@ JetFile: BinaryHeap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(DIV)('/') + OPERATION_REFERENCE + PsiElement(DIV)('/') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') @@ -968,12 +988,14 @@ JetFile: BinaryHeap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') @@ -1002,12 +1024,14 @@ JetFile: BinaryHeap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(MUL)('*') + OPERATION_REFERENCE + PsiElement(MUL)('*') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') PsiWhiteSpace(' ') - PsiElement(PLUS)('+') + OPERATION_REFERENCE + PsiElement(PLUS)('+') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('2') @@ -1067,7 +1091,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(FIELD_IDENTIFIER)('$value') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('it') @@ -1100,7 +1125,8 @@ JetFile: BinaryHeap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') DOT_QIALIFIED_EXPRESSION REFERENCE_EXPRESSION @@ -1110,7 +1136,8 @@ JetFile: BinaryHeap.jet PsiElement(IDENTIFIER)('size') PsiElement(RPAR)(')') PsiWhiteSpace(' ') - PsiElement(ANDAND)('&&') + OPERATION_REFERENCE + PsiElement(ANDAND)('&&') PsiWhiteSpace(' ') PARENTHESIZED PsiElement(LPAR)('(') @@ -1118,7 +1145,8 @@ JetFile: BinaryHeap.jet THIS_EXPRESSION PsiElement(this)('this') PsiWhiteSpace(' ') - PsiElement(GTEQ)('>=') + OPERATION_REFERENCE + PsiElement(GTEQ)('>=') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -1273,7 +1301,8 @@ JetFile: BinaryHeap.jet PsiElement(IDENTIFIER)('a') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') ARRAY_ACCESS_EXPRESSION THIS_EXPRESSION @@ -1294,7 +1323,8 @@ JetFile: BinaryHeap.jet PsiElement(IDENTIFIER)('b') PsiElement(RBRACKET)(']') PsiWhiteSpace(' ') - PsiElement(EQ)('=') + OPERATION_REFERENCE + PsiElement(EQ)('=') PsiWhiteSpace(' ') REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('t') @@ -1341,7 +1371,8 @@ JetFile: BinaryHeap.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('size') PsiWhiteSpace(' ') - PsiElement(MINUS)('-') + OPERATION_REFERENCE + PsiElement(MINUS)('-') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('1') \ No newline at end of file diff --git a/idea/testData/psi/examples/util/Comparison.txt b/idea/testData/psi/examples/util/Comparison.txt index 17b612fe76f..e05b2eeea19 100644 --- a/idea/testData/psi/examples/util/Comparison.txt +++ b/idea/testData/psi/examples/util/Comparison.txt @@ -163,7 +163,8 @@ JetFile: Comparison.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('a') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -188,7 +189,8 @@ JetFile: Comparison.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('b') PsiWhiteSpace(' ') - PsiElement(as)('as') + OPERATION_REFERENCE + PsiElement(as)('as') PsiWhiteSpace(' ') TYPE_REFERENCE USER_TYPE @@ -371,7 +373,8 @@ JetFile: Comparison.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('res') PsiWhiteSpace(' ') - PsiElement(EQEQ)('==') + OPERATION_REFERENCE + PsiElement(EQEQ)('==') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0') @@ -397,7 +400,8 @@ JetFile: Comparison.jet REFERENCE_EXPRESSION PsiElement(IDENTIFIER)('res') PsiWhiteSpace(' ') - PsiElement(LT)('<') + OPERATION_REFERENCE + PsiElement(LT)('<') PsiWhiteSpace(' ') INTEGER_CONSTANT PsiElement(INTEGER_LITERAL)('0')