From 06ba731452069a7629288096f9e17977481aeee2 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 9 Nov 2014 21:24:48 +1100 Subject: [PATCH] traverse: pass opts.scope instead of opts --- lib/6to5/transformation/transformer.js | 4 ++-- lib/6to5/traverse/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/6to5/transformation/transformer.js b/lib/6to5/transformation/transformer.js index 54a741cbc5..06cd8debae 100644 --- a/lib/6to5/transformation/transformer.js +++ b/lib/6to5/transformation/transformer.js @@ -37,7 +37,7 @@ Transformer.prototype.transform = function (file) { astRun("enter"); var build = function (exit) { - return function (node, parent, opts) { + return function (node, parent, scope) { // add any node type aliases that exist var types = [node.type].concat(t.ALIAS_KEYS[node.type] || []); @@ -54,7 +54,7 @@ Transformer.prototype.transform = function (file) { if (exit) fn = fns.exit; if (!fn) return; - return fn(node, parent, file, opts.scope); + return fn(node, parent, file, scope); }; }; diff --git a/lib/6to5/traverse/index.js b/lib/6to5/traverse/index.js index c74e007c64..0e66f70919 100644 --- a/lib/6to5/traverse/index.js +++ b/lib/6to5/traverse/index.js @@ -54,7 +54,7 @@ function traverse(parent, callbacks, opts) { // enter if (callbacks.enter) { - result = callbacks.enter(node, parent, opts2); + result = callbacks.enter(node, parent, opts2.scope); // stop iteration if (result === false) return; @@ -67,7 +67,7 @@ function traverse(parent, callbacks, opts) { // exit if (callbacks.exit) { - maybeReplace(callbacks.exit(node, parent, opts2)); + maybeReplace(callbacks.exit(node, parent, opts2.scope)); } };