module

Dragonstone::Language::Transforms::LexicalBindings

Lowers let and fix declarations into regular assignments by:

  • Mangling the declared name to simulate block scoping.
  • Rewriting references to point at the mangled name within the scope.
  • Rejecting reassignment of a let/fix binding (binding immutability).

Instance methods

apply(program : AST::Program) : AST::Program
Source