Interesting, there's been an [ongoing discussion to use tree-sitter with Emacs](https://archive.casouri.cat/note/2021/emacs-tree-sitter/inde...) because right now, syntax highlighting is a mix of regex and functions.
I don't how language parsing should be exposed to make it easy to have parsing in editors. But I believe some efforts like tree-sitter are most welcome and also more inline with what we expect editors to be.