Beispiel #1
0
 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);
 }
Beispiel #2
0
 private bool ExpectNext(BisTokenType type, string expected)
 {
     return(Next() && Expect(type, expected));
 }