[groovy] remove GrOperationSign

This commit is contained in:
Daniil Ovchinnikov
2018-04-18 15:56:01 +03:00
parent a7db080f4d
commit a1cd576cac
8 changed files with 6 additions and 87 deletions
@@ -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);
@@ -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);
@@ -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 {
}
@@ -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
* <p/>
* 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";
}
}
@@ -6,7 +6,7 @@ Groovy script
Literal
PsiElement(Integer)('27')
PsiWhiteSpace(' ')
Composite shift operator
ASTWrapperPsiElement(<<)
PsiElement(<)('<')
PsiElement(<)('<')
PsiWhiteSpace(' ')
@@ -11,7 +11,7 @@ Groovy script
Literal
PsiElement(Integer)('10')
PsiWhiteSpace(' ')
Composite shift operator
ASTWrapperPsiElement(<<)
PsiElement(<)('<')
PsiElement(<)('<')
PsiWhiteSpace(' ')
@@ -11,7 +11,7 @@ Groovy script
Literal
PsiElement(Integer)('10')
PsiWhiteSpace(' ')
Composite shift operator
ASTWrapperPsiElement(>>>)
PsiElement(>)('>')
PsiElement(>)('>')
PsiElement(>)('>')
@@ -31,7 +31,7 @@ Groovy script
Shift expression
Reference expression
PsiElement(identifier)('test')
Composite shift operator
ASTWrapperPsiElement(<<)
PsiElement(<)('<')
PsiElement(<)('<')
Literal