Class VariableScopeVisitor

All Implemented Interfaces:
GroovyClassVisitor, GroovyCodeVisitor, ErrorCollecting

public class VariableScopeVisitor extends ClassCodeVisitorSupport
Initializes the variable scopes for an AST.

For JEP 394 instanceof pattern variables (GROOVY-12242), this class is the single authoritative source of scope decisions. VariableScopeVisitor.InstanceofFlowBindings answers which pattern variables are definitely bound on each control-flow path; this visitor:

See Also: