Lowering: rewrites already macro-expanded Syntax forms in place, resolving NFL-specific surface syntax (let/set!, loop/recur, defclass, object-variant match patterns, and similar) down to a shape backend.nim can emit directly as Nim AST. Runs after expand.nim and before backend.nim.
Procs
proc lowerModule(forms: seq[Syntax]): seq[Syntax] {. ...raises: [CompilerError, Exception, KeyError], tags: [RootEffect], forbids: [].}
- Lowers a whole module's expanded top-level forms in a shared scope, so later forms see bindings introduced by earlier ones. Mutates forms in place and returns it.