//Note: we don't actually parse in current version, only scan. Will implement full parsing in the future, // to support all intellisense operations private void ParseSource(string newText) { //Explicitly catch the case when new text is empty if (newText != string.Empty) { _parseTree = _compiler.ScanOnly(newText, "Source"); } //notify views var views = GetViews(); foreach (var view in views) view.UpdateParsedSource(_parseTree); }
public EditorAdapter(Compiler compiler) { _compiler = compiler; _context = new CompilerContext(_compiler); _scanner = compiler.Parser.Scanner; _scanner.BeginScan(_context); _parseTree = new ParseTree(string.Empty, "Source"); _colorizerThread = new Thread(ColorizerLoop); _colorizerThread.IsBackground = true; _parserThread = new Thread(ParserLoop); _parserThread.IsBackground = true; }