Example #1
0
        /// <summary>
        /// Compila el codigo del editor actual
        /// </summary>
        /// <returns></returns>
        internal bool Compile()
        {
            bool result = false;

            Editor currentEditor = GetCurrentEditor();

            if (currentEditor != null)
            {
                string code = currentEditor.UI.Text;

                ProgramController controller = new ProgramController(code);

                if (controller.Compile())
                {
                    astImage = controller.GetASTImage();
                    result   = true;
                }

                ProgramConsole.Document.Blocks.Clear();
                ProgramConsole.AppendText(controller.GetTextLogs());
            }

            return(result);
        }