changed terminal token condition to use LA syntax

This commit is contained in:
overflowerror 2021-12-07 18:55:01 +01:00
parent 8d34bc2a23
commit 621f37874f
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ public class HoistingProcessorTest extends AbstractXtextTests {
return "!\"" + keyword + "\".equals(input.LT(" + offset + ").getText())";
}
private String getSyntaxForTerminalToken(String terminal, int offset) {
return "input.LT(" + offset + ").getType() != " + terminal;
return "input.LA(" + offset + ") != " + terminal;
}
@Test

View file

@ -24,7 +24,7 @@ public class TerminalRuleToken implements Token {
@Override
public String negatedCondition() {
return "input.LT(" + position + ").getType() != " + rule.getName();
return "input.LA(" + position + ") != " + rule.getName();
}
@Override