As the SemanticAnalyzer traverses the code tree, it creates a parallel structure defining the variables, their state (local or special), and their binding information. This is found in the VariableBindings topic. Closure information is also stored in this structure. See ClosureAllocation.