diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java index 5077c0f97f5f..a3939d3e0c7d 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/lexer/TokenSets.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.lexer; @@ -242,8 +228,6 @@ public interface TokenSets { mSTAR_STAR_ASSIGN ); - TokenSet SHIFT_SIGNS = TokenSet.create(COMPOSITE_LSHIFT_SIGN, COMPOSITE_RSHIFT_SIGN, COMPOSITE_TRIPLE_SHIFT_SIGN); - TokenSet CODE_REFERENCE_ELEMENT_NAME_TOKENS = TokenSet.create(mIDENT, kDEF, kIN, kAS, kTRAIT); TokenSet BLOCK_SET = TokenSet.create(CLOSABLE_BLOCK, BLOCK_STATEMENT, CONSTRUCTOR_BODY, OPEN_BLOCK, ENUM_BODY, CLASS_BODY); diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/GroovyPsiCreator.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/GroovyPsiCreator.java index 3b102f117e30..758a5c756f07 100644 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/GroovyPsiCreator.java +++ b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/parser/GroovyPsiCreator.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.plugins.groovy.lang.parser; @@ -10,7 +10,6 @@ import org.jetbrains.plugins.groovy.lang.groovydoc.lexer.IGroovyDocElementType; import org.jetbrains.plugins.groovy.lang.groovydoc.psi.GroovyDocPsiCreator; import org.jetbrains.plugins.groovy.lang.lexer.GroovyElementType; import org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes; -import org.jetbrains.plugins.groovy.lang.lexer.TokenSets; import org.jetbrains.plugins.groovy.lang.psi.impl.GrImportAliasImpl; import org.jetbrains.plugins.groovy.lang.psi.impl.GroovyASTPsiElementImpl; import org.jetbrains.plugins.groovy.lang.psi.impl.auxiliary.GrListOrMapImpl; @@ -193,7 +192,6 @@ public class GroovyPsiCreator { if (elem == GroovyElementTypes.RELATIONAL_EXPRESSION) return new GrRelationalExpressionImpl(node); if (elem == GroovyElementTypes.SHIFT_EXPRESSION) return new GrShiftExpressionImpl(node); if (elem == GroovyElementTypes.RANGE_EXPRESSION) return new GrRangeExpressionImpl(node); - if (TokenSets.SHIFT_SIGNS.contains(elem)) return new GrOperationSignImpl(node); if (elem == GroovyElementTypes.ADDITIVE_EXPRESSION) return new GrAdditiveExpressionImpl(node); if (elem == GroovyElementTypes.MULTIPLICATIVE_EXPRESSION) return new GrMultiplicativeExpressionImpl(node); if (elem == GroovyElementTypes.POWER_EXPRESSION) return new GrPowerExpressionImpl(node); diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/expressions/GrOperationSign.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/expressions/GrOperationSign.java deleted file mode 100644 index 907b259323fe..000000000000 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/api/statements/expressions/GrOperationSign.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions; - -import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement; - -/** - * @author ilyas - */ -public interface GrOperationSign extends GroovyPsiElement { -} diff --git a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrOperationSignImpl.java b/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrOperationSignImpl.java deleted file mode 100644 index ff1eb6a2a0ae..000000000000 --- a/plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/GrOperationSignImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions; - -import com.intellij.lang.ASTNode; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrOperationSign; -import org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiElementImpl; - -/** - * @author ilyas - *

- * Use for composite shift operators like >>> or >>= - */ -public class GrOperationSignImpl extends GroovyPsiElementImpl implements GrOperationSign { - - public GrOperationSignImpl(@NotNull ASTNode node) { - super(node); - } - - public String toString() { - return "Composite shift operator"; - } -} diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/sh1.test b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/sh1.test index ec8b6b541564..a8ed98ef3e7b 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/sh1.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/sh1.test @@ -6,7 +6,7 @@ Groovy script Literal PsiElement(Integer)('27') PsiWhiteSpace(' ') - Composite shift operator + ASTWrapperPsiElement(<<) PsiElement(<)('<') PsiElement(<)('<') PsiWhiteSpace(' ') diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift5.test b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift5.test index c3a1d57b16b4..36683040e529 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift5.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift5.test @@ -11,7 +11,7 @@ Groovy script Literal PsiElement(Integer)('10') PsiWhiteSpace(' ') - Composite shift operator + ASTWrapperPsiElement(<<) PsiElement(<)('<') PsiElement(<)('<') PsiWhiteSpace(' ') diff --git a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift6.test b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift6.test index 7ad7e6e52312..15e9e33a5904 100644 --- a/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift6.test +++ b/plugins/groovy/testdata/parsing/groovy/expressions/arithmetic/shift6.test @@ -11,7 +11,7 @@ Groovy script Literal PsiElement(Integer)('10') PsiWhiteSpace(' ') - Composite shift operator + ASTWrapperPsiElement(>>>) PsiElement(>)('>') PsiElement(>)('>') PsiElement(>)('>') diff --git a/plugins/groovy/testdata/parsing/groovy/statements/afterAs.test b/plugins/groovy/testdata/parsing/groovy/statements/afterAs.test index fee11faae30a..faa67f6c603a 100644 --- a/plugins/groovy/testdata/parsing/groovy/statements/afterAs.test +++ b/plugins/groovy/testdata/parsing/groovy/statements/afterAs.test @@ -31,7 +31,7 @@ Groovy script Shift expression Reference expression PsiElement(identifier)('test') - Composite shift operator + ASTWrapperPsiElement(<<) PsiElement(<)('<') PsiElement(<)('<') Literal