Comparing version 0.0.3 to 0.0.4
@@ -65,3 +65,3 @@ /* | ||
VERSION = '0.0.3'; | ||
VERSION = '0.0.4'; | ||
@@ -281,2 +281,3 @@ function assert(cond, text) { | ||
this.directCallToEvalScope = false; | ||
this.thisFound = false; | ||
@@ -400,2 +401,6 @@ if (opt.naming) { | ||
Scope.prototype.__detectThis = function __detectThis() { | ||
this.thisFound = true; | ||
}; | ||
Scope.prototype.__isClosed = function isClosed() { | ||
@@ -453,2 +458,15 @@ return this.left === null; | ||
// API Scope#isThisMaterialized | ||
// return this scope has materialized `this` reference | ||
Scope.prototype.isThisMaterialized = function isThisMaterialized() { | ||
// This is not function scope | ||
if (this.type !== 'function') { | ||
return true; | ||
} | ||
if (!this.isStatic()) { | ||
return true; | ||
} | ||
return this.thisFound; | ||
}; | ||
Scope.name = '__$escope$__'; | ||
@@ -691,2 +709,3 @@ | ||
case Syntax.ThisExpression: | ||
scope.variableScope.__detectThis(); | ||
break; | ||
@@ -693,0 +712,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"main": "escope.js", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"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
28775
656