public IncrementalHighlighter(Highlighter highlighter)
 {
     highlightingParser = new HighlightingParser(highlighter);
     var context = new CompilationContext();
     tokenizer = context.CreateTokenizer(
         token => highlightingParser.OnToken(token),
         () => highlightingParser.OnDone(),
         () => {}
     );
 }
 public IncrementalSourceHighlighter(Highlighter highlighter)
 {
     this.highlighter = highlighter;
 }
 public HighlightingParser(Highlighter highlighter)
 {
     this.highlighter = highlighter;
     this.sourceHightlighter = new IncrementalSourceHighlighter(highlighter);
     parser = new LineParser(source => source(sourceHightlighter), (p, e) => p);
 }