Given lezer parse tree and cursor location, retrieve node?

Given a lezer parse tree and the current cursor location, what is the simplest way to retrieve the corresponding node of the lezer parse tree?

I am implementing something like par-edit; so we have a lisp/scheme-like syntax. I need a way to move up/down/left/right in the abstract syntax tree / parse tree.

The Tree.resolveInner function will find the innermost node at a given position.

1 Like