private bool Expect(BisTokenType type, string expected) { if (t.Type != type || string.CompareOrdinal(t.Value, expected) != 0) { errors.Add(string.Format("Expected '{3}' at {0}, Line={1}, Column={2}", t.File, t.BeginLine, t.BeginPos + 1, expected)); return(false); } return(true); }
private bool ExpectNext(BisTokenType type, string expected) { return(Next() && Expect(type, expected)); }