Yields the remaining positions; frees the cursor when the loop ends,
however it ends. A spent iterator yields { done: true }, never throws.
Idempotent: freeing an already-freed cursor is a no-op.
The next hit position, or undefined when exhausted (fused).
Up to n hit positions in one crossing (fewer — possibly zero — at
exhaustion).
Topdown cursors only: do NOT descend into the last-yielded node (no-op on the other orders).
A resumable traversal over a
ParseHandle; yields node positions. Re-declared over the generated class to add iteration:for (const pos of cursor)drains it and frees the cursor on exhaustion AND on early exit (break).free()is idempotent (an already-freed cursor is a no-op), so an explicitfree()/usingafter iteration never throws.