Skip to main content

Module analysis

Module analysis 

Source
Expand description

Static analysis (SPEC §6.1): a single AST pass with a scope stack mirroring the Environment. Runs before the runtime.

Errors (always): E0504 undefined variable, static E0301/E0302. Warnings (promoted to errors by the caller under –strict): W0501 unused variable, W0502 unused import, W0503 unused function/type, W0303 useless shadow, W0512 effectful call in imported module. Under hermetic: E0505 for any effectful call at all.

Structs§

SemanticAnalyzer

Functions§

analyze
is_root = false — analysis of an imported module (includes W0512).
analyze_with
As analyze, with hermetic denying every effectful call (E0505).
has_blocking
Whether there are blocking diagnostics: errors always, warnings too under strict (SPEC §6.1).