Brummel af8fb5cb7f Refactor binder to use scope depth
Introduced `scope_depth` to the `Binder` to track block nesting. This
allows for correctly determining whether a `def` binding should be
`Address::Global` (at scope depth 0) or `Address::Local`.

The `type_checker` was also updated to handle `Program` and `Block`
nodes by creating a new `TypeContext` for them.

Removed the `wrap_as_lambda` method from `Environment` as the compiler
now always produces a `Program` node, effectively handling the wrapping
at the AST level. Correspondingly, `instantiate` and
`run_script_compiled` were simplified to directly run the `Program`
node.
2026-03-31 15:22:51 +02:00
2026-03-30 15:41:25 +02:00
2026-03-31 15:22:51 +02:00
2026-03-31 15:22:51 +02:00
2026-03-30 15:41:25 +02:00
2026-03-30 15:41:25 +02:00
2026-03-15 22:40:45 +01:00
S
Description
No description provided
6.5 MiB
Languages
Rust 100%