예제 #1
0
파일: Program.cs 프로젝트: rajpaswan/aphid
        static void RunTest(PerfTest test, int iterations)
        {
            var interpreter = new AphidInterpreter();

            if (test.Prologue != null)
            {
                interpreter.Interpret(test.Prologue);
            }

            var ast = new AphidParser(new AphidLexer(test.Body).GetTokens()).Parse();

            for (int i = 0; i < iterations; i++)
            {
                interpreter.Interpret(ast);
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: robocoder/aphid
        static void RunTest(PerfTest test, int iterations)
        {
            var interpreter = new AphidInterpreter();

            if (test.Prologue != null)
            {
                interpreter.Interpret(test.Prologue);
            }

            var ast = new AphidParser(new AphidLexer(test.Body).GetTokens()).Parse();

            for (int i = 0; i < iterations; i++)
            {
                interpreter.Interpret(ast);
            }
        }