use of com.jetbrains.rest.lexer._RestFlexLexer in project intellij-community by JetBrains.
the class RestLexerTest method doTest.
private static void doTest(String text, String... expected) throws IOException {
_RestFlexLexer lexer = createLexer(text);
for (String expectedTokenText : expected) {
IElementType type = lexer.advance();
if (type == null) {
fail("Not enough tokens");
}
String tokenText = "[" + lexer.yytext() + ", " + type + "]";
assertEquals(expectedTokenText, tokenText);
}
}
use of com.jetbrains.rest.lexer._RestFlexLexer in project intellij-community by JetBrains.
the class RestLexerTest method createLexer.
public static _RestFlexLexer createLexer(String text) {
_RestFlexLexer lexer = new _RestFlexLexer((Reader) null);
lexer.reset(text, 0, text.length(), _RestFlexLexer.YYINITIAL);
return lexer;
}
Aggregations