getDefiningScope

The scope in which name is defined: this scope, one of its parents, or null when the name is not defined anywhere in this scope chain.