use of io.github.wysohn.triggerreactor.core.script.Token.Type in project TriggerReactor by wysohn.
the class Parser method nextToken.
private void nextToken() throws IOException, ParserException {
try {
token = lexer.getToken();
if (showWarnings && token != null) {
int row = lexer.getRow();
Type type = token.type;
String value = String.valueOf(token.value);
if (type == null || value == null)
return;
if (deprecationSupervisors.stream().anyMatch(deprecationSupervisor -> deprecationSupervisor.isDeprecated(type, value))) {
this.warnings.add(new DeprecationWarning(row, value, lexer.getScriptLines()[row - 1]));
}
}
} catch (LexerException lex) {
ParserException pex = new ParserException("Error occured while processing a token after " + token);
pex.initCause(lex);
throw pex;
}
}
Aggregations