I've converted syntax parser part of Roslyn project into javascript (Typescript) and it's worked, and now i want to find a javascript-based code editor which can integrate with Roslyn lexer/parser for highlighting
So far, I've found 2 editor:
With ace editor, looks like it only supports highlight with regular expression rules
With codemirror(_https://codemirror.net/), it does support if your lexer can be processed as a sream with state, but i dont know when/which parts of text codemirror will trigger lexer to reparsed as user typing (Roslyn parser already has mechanism to detect change, so i want to reuse it)
(Both ace editor, code mirror support mark text,but i'm not sure if it's good for perfomance, because you may have to clear marks before set a new mark again)
So how can i achieve this, any other code editor should I choose, any idea? Thank you
CodeMirror will re-run its mode on pieces of the document that are changed, you do not need your own change detection. Read this blog post for an explanation of CodeMirror modes.