wdpr
    Preparing search index...

    Module parser/rules/block/module/listpages/extract

    Data requirement extraction from parsed ASTs.

    After parsing, the AST may contain ListPages and ListUsers module nodes that need external data (page lists, user information) to be resolved. This module analyzes the AST to find all such modules, determines what variables their templates use (and therefore what data fields the external provider must supply), and pre-compiles their templates for efficient rendering during the resolution phase.

    The extraction result includes:

    • DataRequirements listing all ListPages/ListUsers queries with their needed variables
    • Pre-compiled template functions keyed by module ID for fast rendering

    This is the first phase of the three-phase ListPages lifecycle:

    1. Extract (this module) - Analyze AST, determine data needs, compile templates
    2. Fetch (external) - Application fetches data based on requirements
    3. Resolve - Substitute fetched data into compiled templates and re-parse

    Interfaces

    ExtractionResult

    Functions

    extractDataRequirements