Skip to content

Commit 86874a5

Browse files
committed
Fix RsLexer state and token name conflict
1 parent fc629fb commit 86874a5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/main/gen/io/runescript/plugin/lang/lexer/_RsLexer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import com.intellij.lexer.FlexLexer;
77
import com.intellij.psi.TokenType;
88
import com.intellij.psi.tree.IElementType;
9-
import it.unimi.dsi.fastutil.ints.IntArrayList;
9+
import io.runescript.plugin.lang.psi.RsTokenTypes;import it.unimi.dsi.fastutil.ints.IntArrayList;
1010
import it.unimi.dsi.fastutil.ints.IntStack;
1111

1212
import java.util.List;
@@ -655,7 +655,7 @@ else if (zzAtEOF) {
655655
switch (zzLexicalState) {
656656
case BLOCK_COMMENT: {
657657
popState();
658-
return BLOCK_COMMENT;
658+
return RsTokenTypes.BLOCK_COMMENT;
659659
} // fall though
660660
case 133: break;
661661
default:
@@ -886,7 +886,7 @@ else if (zzAtEOF) {
886886
case 86: break;
887887
case 37:
888888
{ popState();
889-
return BLOCK_COMMENT;
889+
return RsTokenTypes.BLOCK_COMMENT;
890890
}
891891
// fall through
892892
case 87: break;
@@ -901,7 +901,7 @@ else if (zzAtEOF) {
901901
// fall through
902902
case 89: break;
903903
case 40:
904-
{ return BLOCK_COMMENT;
904+
{ return RsTokenTypes.BLOCK_COMMENT;
905905
}
906906
// fall through
907907
case 90: break;

src/main/grammars/RuneScript.flex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package io.runescript.plugin.lang.lexer;
33
import com.intellij.lexer.FlexLexer;
44
import com.intellij.psi.TokenType;
55
import com.intellij.psi.tree.IElementType;
6+
import io.runescript.plugin.lang.psi.RsTokenTypes;
67
import it.unimi.dsi.fastutil.ints.IntArrayList;
78
import it.unimi.dsi.fastutil.ints.IntStack;
89

@@ -65,19 +66,19 @@ INCOMPLETE_TAG = "<"(shad|col|str|u|img)"="
6566
<BLOCK_COMMENT> {
6667
"*/" {
6768
popState();
68-
return BLOCK_COMMENT;
69+
return RsTokenTypes.BLOCK_COMMENT;
6970
}
7071
<<EOF>> {
7172
popState();
72-
return BLOCK_COMMENT;
73+
return RsTokenTypes.BLOCK_COMMENT;
7374
}
7475
[\s\S] { }
7576
}
7677

7778
<YYINITIAL,STRING_INTERPOLATION> {
7879

7980
// Comments
80-
"/**/" { return BLOCK_COMMENT; }
81+
"/**/" { return RsTokenTypes.BLOCK_COMMENT; }
8182
"/*" { pushState(BLOCK_COMMENT); }
8283

8384
{LINE_COMMENT} { return LINE_COMMENT; }

0 commit comments

Comments
 (0)