Comparing version 0.0.7 to 0.0.8
@@ -377,3 +377,3 @@ /* | ||
} | ||
if (Scope.isRequired(node)) { | ||
if (Scope.isScopeRequired(node)) { | ||
for (i = 0, iz = this.scopes.length; i < iz; ++i) { | ||
@@ -425,6 +425,10 @@ scope = this.scopes[i]; | ||
Scope.isRequired = function isRequired(node) { | ||
return node.type === Syntax.Program || node.type === Syntax.FunctionExpression || node.type === Syntax.FunctionDeclaration || node.type === Syntax.WithStatement || node.type === Syntax.CatchClause; | ||
Scope.isScopeRequired = function isScopeRequired(node) { | ||
return Scope.isVariableScopeRequired(node) || node.type === Syntax.WithStatement || node.type === Syntax.CatchClause; | ||
}; | ||
Scope.isVariableScopeRequired = function isVariableScopeRequired(node) { | ||
return node.type === Syntax.Program || node.type === Syntax.FunctionExpression || node.type === Syntax.FunctionDeclaration; | ||
}; | ||
function analyze(tree) { | ||
@@ -438,3 +442,3 @@ scopes = []; | ||
var i, iz, decl; | ||
if (Scope.isRequired(node)) { | ||
if (Scope.isScopeRequired(node)) { | ||
new Scope(node, {}); | ||
@@ -677,3 +681,3 @@ } | ||
exports.version = '0.0.7'; | ||
exports.version = '0.0.8'; | ||
exports.Reference = Reference; | ||
@@ -680,0 +684,0 @@ exports.Variable = Variable; |
@@ -6,3 +6,3 @@ { | ||
"main": "escope.js", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"engines": { | ||
@@ -9,0 +9,0 @@ "node": ">=0.4.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26185
583