wdpr
    Preparing search index...

    Module parser/rules/block/module/walk

    AST element traversal and transformation utilities.

    Provides shared logic for recursively visiting and transforming child elements across all AST node types that contain nested elements. The AST has several "special" structures (list, table, definition-list, tab-view) that store children in type-specific locations, plus a generic pattern where elements are stored in data.elements. These utilities abstract over those differences so callers can focus on their transformation logic.

    Three main functions are provided:

    • walkElements - Read-only traversal (visitor pattern)
    • mapElementChildren - Stateless transformation of child arrays
    • mapElementChildrenWithState - Stateful transformation with threaded state

    Used by the ListPages extraction, module resolution, and include resolution systems.

    Functions

    mapElementChildren
    mapElementChildrenWithState
    walkElements