hyperlark (TypeScript)
    Preparing search index...

    Class TreeCursor

    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 explicit free()/using after iteration never throws.

    Implements

    • Iterable<number>

    Indexable

    • [key: number]: () => void
    Index
    • Yields the remaining positions; frees the cursor when the loop ends, however it ends. A spent iterator yields { done: true }, never throws.

      Returns IterableIterator<number>