Don't use "objects" in lib/compiler/visitor.js

The "objects" module will be removed.

See #442.
redux
David Majda 8 years ago
parent 76e70c3923
commit 66ca7e2168

@ -1,7 +1,5 @@
"use strict";
let objects = require("../utils/objects");
/* Simple AST node visitor builder. */
let visitor = {
build: function(functions) {
@ -62,7 +60,11 @@ let visitor = {
any: visitNop
};
objects.defaults(functions, DEFAULT_FUNCTIONS);
Object.keys(DEFAULT_FUNCTIONS).forEach(type => {
if (!functions.hasOwnProperty(type)) {
functions[type] = DEFAULT_FUNCTIONS[type];
}
});
return visit;
}

Loading…
Cancel
Save