Beispiel #1
0
 public void Interpret(PrefabSingleInterpretArgs args)
 {
     try
     {
         if (_interpretFunc != null)
         {
             _scope.Engine.Operations.Invoke(_interpretFunc, args);
         }
     }
     catch (Exception e)
     {
         throw PythonScriptHost.Instance.GetFormattedException(e, Name);
     }
 }
Beispiel #2
0
        public Tree Interpret(Tree frame)
        {
            if (_interpreter != null)
            {
                Tree        tree               = LayerChain.InterpretChain(_layers, frame);
                MutableTree mutable            = MutableTree.FromTree(tree);
                PrefabSingleInterpretArgs args = new PrefabSingleInterpretArgs(mutable, Storage);

                try
                {
                    _interpreter.Interpret(args);
                }
                catch (Exception e)
                {
                    mutable["interpretation_exception"] = e;
                }

                return(Tree.FromMutable(mutable));
            }

            return(frame);
        }
Beispiel #3
0
        public void Interpret(PrefabSingleInterpretArgs args)
        {
            try
            {

                if (_interpretFunc != null)
                {
                    _scope.Engine.Operations.Invoke(_interpretFunc, args);
                }

            }
            catch(Exception e)
            {
                throw PythonScriptHost.Instance.GetFormattedException(e, Name);
            }
        }
Beispiel #4
0
        public Tree Interpret(Tree frame)
        {
            if (_interpreter != null)
            {
                Tree tree = LayerChain.InterpretChain(_layers, frame);
                MutableTree mutable = MutableTree.FromTree(tree);
                PrefabSingleInterpretArgs args = new PrefabSingleInterpretArgs(mutable, Storage);

                try
                {
                    _interpreter.Interpret(args);
                }
                catch (Exception e)
                {

                    mutable["interpretation_exception"] = e;
                }

                return Tree.FromMutable(mutable);
            }

            return frame;
        }