ast-types
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -69,3 +69,3 @@ var assert = require("assert"); | ||
NPp.getValueProperty = function(name) { | ||
return types.getFieldValue(this.value, name); | ||
return types.getFieldValue(this.value, name); | ||
}; | ||
@@ -72,0 +72,0 @@ |
@@ -9,2 +9,4 @@ var assert = require("assert"); | ||
function traverse(path) { | ||
assert.ok(path instanceof NodePath); | ||
if (isArray.check(path.value)) { | ||
@@ -16,17 +18,6 @@ path.each(traverse); | ||
if (callback.call(path, node) === false) { | ||
if (callback.call(path, node, traverse) === false) { | ||
return; | ||
} | ||
// Child paths are cached, so path.parentPath.get(path.name) | ||
// should return the same Path object unless path.replace was | ||
// called during the callback. | ||
path = path.parentPath.get(path.name); | ||
// The node might have been replaced during the callback. | ||
node = path.value; | ||
if (!Node.check(node)) { | ||
return; | ||
} | ||
types.eachField(node, function(name, child) { | ||
@@ -33,0 +24,0 @@ var childPath = path.get(name); |
@@ -21,3 +21,3 @@ { | ||
], | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"homepage": "http://github.com/benjamn/ast-types", | ||
@@ -33,3 +33,3 @@ "repository": { | ||
"dependencies": { | ||
"ast-path": "~0.1.2" | ||
"ast-path": "~0.1.4" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": {}, |
403029
11322
Updatedast-path@~0.1.4