more accurately removed unnecessary code

This commit is contained in:
Maxim.Mossienko
2016-06-06 21:39:01 +02:00
parent bea58c8ca6
commit d4fb8b48ce
2 changed files with 2 additions and 1 deletions
@@ -38,7 +38,7 @@ public class XmlHighlightingLexer extends DelegateLexer {
}
private IElementType fixWrongTokenTypes(IElementType tokenType) {
int state = getState();
int state = getState() & 0x1f; // __XmlLexer.C_COMMENT_END is last state with value 30
if (tokenType == XmlTokenType.XML_NAME) {
if (state == __XmlLexer.TAG || state == __XmlLexer.END_TAG) {
// translate XML names for tags into XmlTagName
@@ -64,6 +64,7 @@ import com.intellij.psi.xml.*;
%state DOCTYPE
%xstate CDATA
%state C_COMMENT_START
/* this state should be last, number of states should be less than 16 */
%state C_COMMENT_END
ALPHA=[:letter:]