// Delay timer for internal parsing void InternalParser_Tick(object sender, EventArgs e) { if (currentTab == null || !currentTab.shouldParse) { intParserTimer.Stop(); DEBUGINFO("Stop: Internal Parser"); return; } if (DateTime.Now >= intParser_TimeNext && !parserIsRunning) { intParserTimer.Stop(); DEBUGINFO("Run: Internal Parser"); if (!Settings.enableParser) // Parser off { tbOutputParse.Text = string.Empty; parserLabel.Text = "Parser: Get only macros"; parserLabel.ForeColor = Color.Crimson; new ParserInternal(currentTab, this); CodeFolder.UpdateFolding(currentDocument, currentTab.filename, currentTab.parseInfo.procs); ParserCompleted(currentTab, false); } else { CodeFolder.UpdateFolding(currentDocument, currentTab.filepath); //Quick update procedure data ParserInternal.UpdateProcInfo(ref currentTab.parseInfo, currentDocument.TextContent, currentTab.filepath); } } }
public Task <ParseResult> ParsePrompt(string s, CancellationToken c) { return(Task.FromResult(new ParseResult { Finished = false })); var pStarted = false; ParserInternal tt; lock (this) { if (mParser == null || mParser.Finished) { pStarted = true; mParser = new ParserInternal(mAlg, s, c); } tt = mParser; } if (pStarted) { Task.Run(tt.Parse); return(tt.SetResultTask); } return(tt.Continue(s)); }
public IRawTree Parse(string input) { return(new PhoenixSqlRawTreeNode((IMessage)ParserInternal.Parse(input))); }
public async Task <NodeExpr> Parse(string s, CancellationToken c) { mParser = new ParserInternal(mAlg, s, c); return(await mParser.ParseExpr()); }