Closed conartist6 closed 2 years ago
Picking this up, as it is next.
I think the solution is going to be to make match
aware of type: 'Separator'
descriptors. This way the implementation can be agnostic to exactly what a separator is, but can be aware of the idea that separators occur between nodes and their tokens may be found on either the inside of the parent or on the outside of the child.
Ok, yes, revisiting my roadmap this is definitely next. Essentially it's handling the non-normal representation of whitespace that I intend to leverage in order to push comments down in the tree, rendering them attached to nodes.
This library allows whitespace or comments to be added around the edges of nodes. This is useful for making modifications, but complicates the process of querying the data. When we rebuild tokens we should rebalance any dangling whitespace or comments to be attached to the outer context.