예제 #1
0
        private T TestScripting <T>(T input)
        {
            var script  = new IglScriptBody();
            var builder = new IglScriptBuilder(script);
            var objId   = builder.RegisterRoot(
                input,
                out _);

            while (builder.HasPressure)
            {
                builder.Pump();
                Console.WriteLine(builder.TokenCount);
            }

            Console.WriteLine("=============");
            builder.Report(Console.Out);
            script.Execute(out var map);
            return((T)map[objId]);
        }
예제 #2
0
 public IglTokenExecutionContext(
     IglScriptBody scriptBody)
 {
     Script = scriptBody;
 }