Use immutable data structures in AST + freeze nodes