コード例 #1
0
ファイル: CatPrimitives.cs プロジェクト: catb0t/cat-language
            public override void Eval(Executor exec)
            {
                Function c = exec.TypedPop<Function>();
                Function t = exec.TypedPop<Function>();
                int n = exec.Count();
                try
                {
                    t.Eval(exec);
                }
                catch (CatException e)
                {
                    exec.ClearTo(n);
                    Output.WriteLine("exception caught");

                    exec.Push(e.GetObject());
                    c.Eval(exec);
                }
            }