The parse-tree's node are just indices into the string that was
parsed. To represents a "position" in the parse tree, we were
previously using a list of indices into the parse tree. This was
called a "path".
Having to handle the indices, the nodes and the parser's state (which
contains the string and the parse-tree) was getting very unwidely.
Not only it was unwidely, but it was hard to make it "efficient",
getting the parent nodes given a node's path was traversing a good
part of the parse-tree multiple times.
Instead of all that, we use "nested-vector iterators". Long-story
short: it fixes all those shortcomings.
It's efficient, because the "iterator" keeps a reference to each
vectors in the path to the node in parse tree, not just the indices,
so getting any parent node is O(1). For the same reason, we can also
get siblings (not implemented yet) and any parents' siblings also in
O(1).
This should also facilitate incremental parsing and "representing the
cursor's position in a buffer".
_and more_
> Oh yeah. It's all coming togheter
DO AS I SAY, NOT AS I DO!
EYE FOR, AND I LEAVES;
THE WHOLE WORLD BLIND?