Naive attempt to add scope/enter/leave to AST