コード例 #1
0
ファイル: Parser.cs プロジェクト: bellyoshi/ActiveBa6
 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}>");
        }