remove obsolete lexemes

This commit is contained in:
Maxim.Medvedev
2011-12-12 12:55:39 +04:00
parent c578743d29
commit d9be85aa38
3 changed files with 3 additions and 23 deletions
@@ -19,12 +19,13 @@ import com.intellij.lang.ASTNode;
import com.intellij.openapi.util.Condition;
import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.IElementType;
import static org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes.*;
import org.jetbrains.plugins.groovy.lang.psi.api.auxiliary.GrListOrMap;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.arguments.GrArgumentList;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrCodeBlock;
import org.jetbrains.plugins.groovy.lang.psi.api.statements.params.GrParameterList;
import static org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes.*;
/**
* @author Maxim.Medvedev
*/
@@ -45,8 +46,7 @@ public class GroovyWordSelectionFilter implements Condition<PsiElement> {
type == mGDOC_TAG_VALUE_TOKEN ||
type == mREGEX_BEGIN ||
type == mREGEX_CONTENT ||
type == mREGEX_END ||
type == mWRONG_REGEX_LITERAL) {
type == mREGEX_END) {
return true;
}
@@ -75,7 +75,6 @@ public interface GroovyTokenTypes extends GroovyDocElementTypes {
IElementType mREGEX_LITERAL = new GroovyElementType("regexp");
IElementType mDOLLAR_SLASH_REGEX_LITERAL = new GroovyElementType("$/ regexp");
IElementType mWRONG_DOLLAR_SLASH_LITERAL = new GroovyElementType("wrong dollar slash literal");
IElementType mREGEX_BEGIN = new GroovyElementType("regex begin");
IElementType mREGEX_CONTENT = new GroovyElementType("regex content");
@@ -85,9 +84,6 @@ public interface GroovyTokenTypes extends GroovyDocElementTypes {
IElementType mDOLLAR_SLASH_REGEX_CONTENT = new GroovyElementType("$/ regex content");
IElementType mDOLLAR_SLASH_REGEX_END = new GroovyElementType("$/ regex end");
IElementType mWRONG_REGEX_LITERAL = new GroovyElementType("wrong regex");
IElementType mWRONG_DOLLAR_SLASH_REGEX_LITERAL = new GroovyElementType("wrong $/ regex");
/* **************************************************************************************************
* Common tokens: operators, braces etc.
* ****************************************************************************************************/
@@ -92,22 +92,6 @@ public class PrimaryExpression implements GroovyElementTypes {
if (TokenSets.CONSTANTS.contains(tokenType)) {
return ParserUtils.eatElement(builder, LITERAL);
}
if (mWRONG_REGEX_LITERAL == tokenType) {
PsiBuilder.Marker marker = builder.mark();
builder.advanceLexer();
builder.error(GroovyBundle.message("regex.end.expected"));
marker.done(LITERAL);
return LITERAL;
}
if (mWRONG_DOLLAR_SLASH_LITERAL == tokenType) {
final PsiBuilder.Marker marker = builder.mark();
builder.advanceLexer();
builder.error(GroovyBundle.message("dollar.slash.end.expected"));
marker.done(LITERAL);
return LITERAL;
}
// TODO implement all cases!
return WRONGWAY;
}