Exemple #1
0
 public void ColorizeOnly()
 {
     IDEColors.Clear();
     Coloring       = true;
     MessagingState = new MessageManager();
     Compile(source);
     verboseText = "";
     Coloring    = false;
 }
Exemple #2
0
        public string ColorizeOnly()
        {
            IDEColors.Clear();
            Coloring       = true;
            MessagingState = new MessageManager();
            Compile(source);

            /*			var compiler = new OrangeCompiler(source)
             *       {
             *          Verbose = verboseCompile
             *       };
             *       compiler.Compile();*/
            verboseText = ""; //compiler.VerboseText;
            Coloring    = false;
            return("");
        }
Exemple #3
0
        public string Execute()
        {
            CompilerState.Reset();
            IDEColors.Clear();
            Coloring       = true;
            MessagingState = new MessageManager();
            block          = Compile(source);
            verboseText    = "";
            Coloring       = false;
            if (AutoVariable)
            {
                block.Add(new End());
                block.Add(new Push(new Variable("$out")));
                block.Add(new Assign());
                block.Add(new Push(new Variable("sys")));
                block.Add(new SendMessage("dump", new Arguments()));
                block.Add(new End());
            }
            var runtime = new OrangeRuntime(block, Text, fileCache, console)
            {
                ModuleFolders = ModuleFolders
            };

            try
            {
                var result = runtime.Execute();
                LastValue = runtime.LastValue;
                LastType  = runtime.LastType;
                return(result);
            }
            catch (Stop.StopException exception)
            {
                LastValue = exception.Message;
                LastType  = "Stopped";
                return($"Stopped: {exception.Message}");
            }
        }