4.2 Prelude Processing
Before tokenization, leading prelude directives are processed:
- Parse the leading prelude at the beginning of the file
- Check any
$supported_targetsdeclaration against the selected compile target - Evaluate narrow
if $target ...blocks and skip inactive block bodies - Emit any active
$warningor$errordiagnostics - For each active import, recursively process the imported file
- Prepend imported content to the main source
- Remove prelude directives from the source being compiled
- Track imported files to prevent duplicate inclusion