mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed unnecessary code
This commit is contained in:
@@ -32,26 +32,13 @@ public class XmlHighlightingLexer extends DelegateLexer {
|
||||
|
||||
if (tokenType == null) return tokenType;
|
||||
|
||||
int state = getState() & 0xF;
|
||||
|
||||
tokenType = fixWrongTokenTypes(tokenType, state);
|
||||
if (tokenType != XmlTokenType.XML_COMMENT_CHARACTERS &&
|
||||
tokenType != XmlTokenType.XML_COMMENT_END &&
|
||||
tokenType != XmlTokenType.XML_COMMENT_START &&
|
||||
tokenType != XmlTokenType.XML_ATTRIBUTE_VALUE_START_DELIMITER) {
|
||||
|
||||
// TODO: do not know when this happens!
|
||||
switch (state) {
|
||||
case __XmlLexer.DOCTYPE:
|
||||
tokenType = XmlTokenType.XML_DECL_START;
|
||||
break;
|
||||
}
|
||||
}
|
||||
tokenType = fixWrongTokenTypes(tokenType);
|
||||
|
||||
return tokenType;
|
||||
}
|
||||
|
||||
static IElementType fixWrongTokenTypes(IElementType tokenType, final int state) {
|
||||
private IElementType fixWrongTokenTypes(IElementType tokenType) {
|
||||
int state = getState();
|
||||
if (tokenType == XmlTokenType.XML_NAME) {
|
||||
if (state == __XmlLexer.TAG || state == __XmlLexer.END_TAG) {
|
||||
// translate XML names for tags into XmlTagName
|
||||
|
||||
Reference in New Issue
Block a user