pub struct HookSet {
pub label: bool,
pub validate: bool,
pub resolve: bool,
pub ir_build: bool,
pub hover: bool,
pub completion: bool,
pub code_action: bool,
pub render: Vec<RenderHook>,
}Expand description
Hook participation. Each field defaults to “not implemented”.
resolve and ir_build form the two lifecycle-phase hooks for
content-substitution: resolve runs during the resolve phase and
splices the returned wire node into the host AST (the canonical
example is lex.include). ir_build runs while the host constructs
its in-memory IR and produces a typed wire node consumed in IR-build
position only — the canonical examples are lex.tabular.table and
lex.media.*. Pair ir_build with render on the same schema to
give one label both an IR shape and per-format serialization through
one registration (the unified registry surface for #615).
Fields§
§label: bool§validate: bool§resolve: bool§ir_build: boolIR-build participation. When true, the host invokes
LexHandler::on_ir_build
during IR construction (the verbatim/IR-hydration lifecycle).
Distinct from resolve (AST-substitution lifecycle) so a schema
can declare exactly the lifecycle phase it participates in.
hover: bool§completion: bool§code_action: bool§render: Vec<RenderHook>Render hooks declare which target formats they produce. An empty vector means the label does not participate in rendering.