pass scope to transformers
This commit is contained in:
@@ -35,7 +35,7 @@ Transformer.prototype.transform = function (file) {
|
||||
var self = this;
|
||||
|
||||
var build = function (exit) {
|
||||
return function (node, parent) {
|
||||
return function (node, parent, opts) {
|
||||
// add any node type aliases that exist
|
||||
var types = [node.type].concat(t.ALIAS_KEYS[node.type] || []);
|
||||
|
||||
@@ -52,7 +52,7 @@ Transformer.prototype.transform = function (file) {
|
||||
if (exit) fn = fns.exit;
|
||||
if (!fn) return;
|
||||
|
||||
return fn(node, parent, file);
|
||||
return fn(node, parent, file, opts.scope);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user