Exemplo n.º 1
0
        static void RunProgram(string code, decimal input, StringBuilder stringBuilder)
        {
            var program = Parser.Parser.Parse(Tokenizer.Tokenizer.Tokenize(code));

            var runTimeState = new RuntimeState(1);

            runTimeState.Inputs[0] = input;
            int pc       = 0;
            var callTree = new CallTree(program, ref pc);

            while (!callTree.Tick(runTimeState, program.Constants, stringBuilder))
            {
            }
        }