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.
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 arraysmapElementChildrenWithState- Stateful transformation with threaded stateUsed by the ListPages extraction, module resolution, and include resolution systems.