示例#1
0
 protected void Match(int x)
 {
     if (LA(1) == x)
     {
         Consume();
     }
     else
     {
         throw new MismatchedTokenException($"expecting {TokenTypes.TokenName(x)}; found {LT(1)}");
     }
 }
示例#2
0
        public override string ToString()
        {
            string tname = TokenTypes.TokenName(Type);

            return($"<'{Text}',{tname}>");
        }