Will it be possible, using Lezer, to record the “local state at the cursor” and update it dynamically? What I mean is, suppose you have an XML document, say with a lot of tags. Now suppose we are in the editor (say CodeMirror) and the XML document and cursor position look as follows:
<remark> ... </remark> <remark> ... * Cursor is here </remark>
It would be nice to know that, at the current cursor position, we are inside the second remark environment. Is that possible with Lezer and/or CodeMirror?
I have in mind eventually implementing the procedure
XML stylesheet + XML document --> HTML document
directly in CodeMirror + Lezer in this way. (Or is there a better way?)