Closed conartist6 closed 1 year ago
I've settled on exposing matchNodesByRef
, which saves you from needing to do anything very complicated to achieve a traversal. You don't need to know about the structure of the AST to traverse it, and you don't need to set up and use a resolver either.
I currently provide a few discrete tree-integration methods exported from index, e.g.
updateTokens
. These methods traverse a match tree. I would like to refactor that code into traversal and visitors, so that a single traversal could perform many operations, e.g. rebuilding tokens and updating ranges in a single pass.