pub trait StatementHook: Provider {
// Provided methods
fn before_statement(
&self,
_stmt: &Statement<'_>,
_context: &mut HookContext<'_, '_>,
) -> HookResult<HookAction> { ... }
fn after_statement(
&self,
_stmt: &Statement<'_>,
_context: &mut HookContext<'_, '_>,
) -> HookResult<()> { ... }
}Expand description
Hook trait for intercepting statement analysis.
This hook receives the real AST statement and full mutable context, allowing hooks to inspect statements, report issues, and modify analysis state.
Provided Methods§
Sourcefn before_statement(
&self,
_stmt: &Statement<'_>,
_context: &mut HookContext<'_, '_>,
) -> HookResult<HookAction>
fn before_statement( &self, _stmt: &Statement<'_>, _context: &mut HookContext<'_, '_>, ) -> HookResult<HookAction>
Called before a statement is analyzed.
Return HookAction::Continue to proceed with normal analysis, or
HookAction::Skip to skip analysis of this statement.
Sourcefn after_statement(
&self,
_stmt: &Statement<'_>,
_context: &mut HookContext<'_, '_>,
) -> HookResult<()>
fn after_statement( &self, _stmt: &Statement<'_>, _context: &mut HookContext<'_, '_>, ) -> HookResult<()>
Called after a statement has been analyzed.