コード例 #1
0
        // External parse start
        private void bwSyntaxParser_DoWork(object sender, DoWorkEventArgs eventArgs)
        {
            WorkerArgs args       = (WorkerArgs)eventArgs.Argument;
            var        ExtParser  = new ParserExternal(false);
            bool       prevStatus = args.tab.parseInfo.parseError;

            args.tab.parseInfo = ExtParser.Parse(args.text, args.tab.filepath, args.tab.parseInfo);
            args.status        = ExtParser.LastStatus;
            //args.parseIsFail = prevStatus & (args.status > 0);
            eventArgs.Result = args;
            parserIsRunning  = false;
        }
コード例 #2
0
        // Parse first open script
        private void FirstParseScript(TabInfo cTab)
        {
            cTab.textEditor.Document.ExtraWordList = new HighlightExtraWord();

            tbOutputParse.Text = string.Empty;

            firstParse = true;

            GetMacros.GetGlobalMacros(Settings.pathHeadersFiles);

            DEBUGINFO("First Parse...");
            new ParserInternal(cTab, this);

            //while (parserIsRunning) System.Threading.Thread.Sleep(10); // Avoid stomping on files while the parser is running

            var ExtParser = new ParserExternal(firstParse);

            cTab.parseInfo = ExtParser.Parse(cTab.textEditor.Text, cTab.filepath, cTab.parseInfo);
            DEBUGINFO("External first parse status: " + ExtParser.LastStatus);

            HighlightProcedures.AddAllToList(cTab.textEditor.Document, cTab.parseInfo.procs);
            CodeFolder.UpdateFolding(cTab.textEditor.Document, cTab.filename, cTab.parseInfo.procs);
            CodeFolder.GetProceduresCollapse(cTab.textEditor.Document, cTab.filename);

            GetParserErrorLog(cTab);

            if (cTab.parseInfo.parseError)
            {
                tabControl2.SelectedIndex = 2;
                if (WindowState != FormWindowState.Minimized)
                {
                    MaximizeLog();
                }
            }
            firstParse = false;
        }