function getScope(identifier) {
            for (let currentNode = identifier; currentNode; currentNode = currentNode.parent) {
                const scope = sourceCode.scopeManager.acquire(currentNode, true);

                if (scope) {
                    return scope;
                }
            }
            return null;
        }
function getScope(identifier) {
            for (let currentNode = identifier; currentNode; currentNode = currentNode.parent) {
                const scope = sourceCode.scopeManager.acquire(currentNode, true);

                if (scope) {
                    return scope;
                }
            }
            return null;
        }
function getScope ( identifier ) { for ( let currentNode = identifier ; currentNode ; currentNode = currentNode . parent ) { const scope = sourceCode . scopeManager . acquire ( currentNode , true ) ; if ( scope ) { return scope ; } } return null ; }
Gets the variable scope around this variable reference
@param {ASTNode} identifier An `Identifier` AST node
@returns {Scope|null} An escope Scope
Gets the variable scope around this variable reference
Get the scope of the given identifier