protected void ExpectNoShift(ListTokenTester tester) { if (!TestNoShift(tester)) { throw lexer.GetLastTokenError(tester); } }
public ListTokenTester(ListTokenTester other, Token.Type[] addTokens) { var list = new List <Token.Type>(other.TestedTypes); list.AddRange(addTokens); TestedTypes = list.ToArray(); }
protected bool Test(ListTokenTester tester, StateT after) { if (TestNoShift(tester)) { PeekToken(after); return(true); } return(false); }
protected void Expect(ListTokenTester tester, StateT after) { ExpectNoShift(tester); PeekToken(after); }
protected bool TestNoShift(ListTokenTester tester) => HasToken() && tester.Test(token.type);
public ListTokenTester(ListTokenTester other, Token.Type addToken) : this(other, new[] { addToken }) { }