Skip to content

Commit

Permalink
feat(babel-plugin-espower): pass visitorKeys to escallmatch
Browse files Browse the repository at this point in the history
  • Loading branch information
twada committed May 1, 2015
1 parent b6d2278 commit e59ea55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/create-espower-visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ function isCalleeOfParentCallExpression(parentNode, currentKey) {
}

module.exports = function createEspowerVisitor (options) {
var opts = extend(espower.defaultOptions(), options);
var matchers = opts.patterns.map(escallmatch);
var opts = extend(espower.defaultOptions(), { visitorKeys: types.VISITOR_KEYS }, options);
var matchers = opts.patterns.map(function (pattern) { return escallmatch(pattern, opts); });
return Object.keys(types.VISITOR_KEYS).reduce(function (handlers, nodeType) {
handlers[nodeType] = {
enter: function (currentNode, parentNode, scope, file) {
Expand Down

0 comments on commit e59ea55

Please sign in to comment.