ast-types
Advanced tools
Comparing version 0.3.4 to 0.3.5
@@ -12,7 +12,10 @@ var assert = require("assert"); | ||
assert.ok(Scope.isEstablishedBy(node)); | ||
var depth; | ||
if (parentScope) { | ||
assert.ok(parentScope instanceof Scope); | ||
depth = parentScope.depth + 1; | ||
} else { | ||
parentScope = null; | ||
depth = 0; | ||
} | ||
@@ -23,2 +26,3 @@ | ||
isGlobal: { value: !parentScope, enumerable: true }, | ||
depth: { value: depth }, | ||
parent: { value: parentScope }, | ||
@@ -71,2 +75,3 @@ bindings: { value: {} } | ||
// TODO What about CatchClause?? | ||
function scanScope(node, bindings) { | ||
@@ -73,0 +78,0 @@ if (isArray.check(node)) { |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"homepage": "http://github.com/benjamn/ast-types", | ||
@@ -24,0 +24,0 @@ "repository": { |
404232
11360