Additional pass over the AST, before any type
checking/ translation
Add escape? field to locals and formals in AST,
initially set to false
Construct symbol table during pass
Entry for every local and formal, indicating lexical
level and with a pointer to AST entry
On every access to local/formal
Lookup in table, check if declaration level is greater
than current level – set escape? to true if so
Text Box: ‹#›