acorn
Advanced tools
Comparing version 5.6.1 to 5.6.2
@@ -0,1 +1,7 @@ | ||
## 5.6.2 (2018-06-05) | ||
### Bug fixes | ||
In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. | ||
## 5.6.1 (2018-06-01) | ||
@@ -2,0 +8,0 @@ |
@@ -20,5 +20,4 @@ // AST walker module for Mozilla Parser API compatible trees | ||
function simple(node, visitors, baseVisitor, state, override) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
(function c(node, st, override) { | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type, found = visitors[type]; | ||
@@ -34,5 +33,5 @@ baseVisitor[type](node, st, c); | ||
function ancestor(node, visitors, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
var ancestors = [];(function c(node, st, override) { | ||
var ancestors = []; | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type, found = visitors[type]; | ||
@@ -71,5 +70,4 @@ var isNew = node != ancestors[ancestors.length - 1]; | ||
function full(node, callback, baseVisitor, state, override) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
(function c(node, st, override) { | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type; | ||
@@ -84,4 +82,3 @@ baseVisitor[type](node, st, c); | ||
function fullAncestor(node, callback, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
if (!baseVisitor) { baseVisitor = base; } | ||
var ancestors = [];(function c(node, st, override) { | ||
@@ -101,4 +98,3 @@ var type = override || node.type; | ||
function findNodeAt(node, start, end, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
if (!baseVisitor) { baseVisitor = base; } | ||
test = makeTest(test); | ||
@@ -125,5 +121,4 @@ try { | ||
function findNodeAround(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
try { | ||
@@ -144,5 +139,4 @@ (function c(node, st, override) { | ||
function findNodeAfter(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
try { | ||
@@ -163,5 +157,4 @@ (function c(node, st, override) { | ||
function findNodeBefore(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
var max;(function c(node, st, override) { | ||
@@ -187,5 +180,3 @@ if (node.start > pos) { return } | ||
function make(funcs, baseVisitor) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
var visitor = create(baseVisitor); | ||
var visitor = create(baseVisitor || base); | ||
for (var type in funcs) { visitor[type] = funcs[type]; } | ||
@@ -192,0 +183,0 @@ return visitor |
@@ -26,5 +26,4 @@ (function (global, factory) { | ||
function simple(node, visitors, baseVisitor, state, override) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
(function c(node, st, override) { | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type, found = visitors[type]; | ||
@@ -40,5 +39,5 @@ baseVisitor[type](node, st, c); | ||
function ancestor(node, visitors, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
var ancestors = [];(function c(node, st, override) { | ||
var ancestors = []; | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type, found = visitors[type]; | ||
@@ -77,5 +76,4 @@ var isNew = node != ancestors[ancestors.length - 1]; | ||
function full(node, callback, baseVisitor, state, override) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
(function c(node, st, override) { | ||
if (!baseVisitor) { baseVisitor = base | ||
; }(function c(node, st, override) { | ||
var type = override || node.type; | ||
@@ -90,4 +88,3 @@ baseVisitor[type](node, st, c); | ||
function fullAncestor(node, callback, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
if (!baseVisitor) { baseVisitor = base; } | ||
var ancestors = [];(function c(node, st, override) { | ||
@@ -107,4 +104,3 @@ var type = override || node.type; | ||
function findNodeAt(node, start, end, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
if (!baseVisitor) { baseVisitor = base; } | ||
test = makeTest(test); | ||
@@ -131,5 +127,4 @@ try { | ||
function findNodeAround(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
try { | ||
@@ -150,5 +145,4 @@ (function c(node, st, override) { | ||
function findNodeAfter(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
try { | ||
@@ -169,5 +163,4 @@ (function c(node, st, override) { | ||
function findNodeBefore(node, pos, test, baseVisitor, state) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
test = makeTest(test); | ||
if (!baseVisitor) { baseVisitor = base; } | ||
var max;(function c(node, st, override) { | ||
@@ -193,5 +186,3 @@ if (node.start > pos) { return } | ||
function make(funcs, baseVisitor) { | ||
if ( baseVisitor === void 0 ) baseVisitor = base; | ||
var visitor = create(baseVisitor); | ||
var visitor = create(baseVisitor || base); | ||
for (var type in funcs) { visitor[type] = funcs[type]; } | ||
@@ -198,0 +189,0 @@ return visitor |
@@ -7,3 +7,3 @@ { | ||
"module": "dist/acorn.es.js", | ||
"version": "5.6.1", | ||
"version": "5.6.2", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=0.4.0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
562765