Exemplo n.º 1
0
        public override List <ProgramError> Compile()
        {
            List <ProgramError> errors = new List <ProgramError>();

            var engine        = Python.CreateEngine();
            var source        = scriptEngine.CreateScriptSourceFromString(ProgramBlock.ScriptSetup);
            var errorListener = new ScriptEngineErrors(CodeBlockEnum.TC);

            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            errorListener = new ScriptEngineErrors(CodeBlockEnum.CR);
            source        = scriptEngine.CreateScriptSourceFromString(ProgramBlock.ScriptSource);
            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            engine.Runtime.Shutdown();
            engine = null;

            return(errors);
        }
Exemplo n.º 2
0
        public List <ProgramError> Compile()
        {
            List <ProgramError> errors = new List <ProgramError>();

            var engine        = Ruby.CreateEngine();
            var source        = engine.CreateScriptSourceFromString(programBlock.ScriptCondition);
            var errorListener = new ScriptEngineErrors("TC");

            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            errorListener = new ScriptEngineErrors("CR");
            source        = engine.CreateScriptSourceFromString(programBlock.ScriptSource);
            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            engine.Runtime.Shutdown();
            engine = null;

            return(errors);
        }
Exemplo n.º 3
0
        public List<ProgramError> Compile()
        {
            List<ProgramError> errors = new List<ProgramError>();

            var engine = Python.CreateEngine();
            var source = scriptEngine.CreateScriptSourceFromString(programBlock.ScriptCondition);
            var errorListener = new ScriptEngineErrors("TC");
            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            errorListener = new ScriptEngineErrors("CR");
            source = scriptEngine.CreateScriptSourceFromString(programBlock.ScriptSource);
            source.Compile(errorListener);
            errors.AddRange(errorListener.Errors);
            engine.Runtime.Shutdown();
            engine = null;

            return errors;
        }