I have a custom language with a parser written in menhir, and I’m now developing a codemirror editor for it. I’ve read that tree-sitter (and Lezer, the codemirror specific version of it) are highly optimized for being good parsers in editors, e.g. they more often have to deal with in-progress/incomplete syntax. I’m trying to figure out whether it would make enough of a difference to be worth having two separate implementations of the lexer/parser (it would hopefully just be separate sets of definition files that I’d need to keep in sync), or whether reusing the menhir parser as much as possible is good enough.
Does anyone have experience with this? Specifically using a menhir-parsed language for the editor?