Update .bashrc
[dotfiles/.git] / lib / macro / one.js
1 'use strict';
2
3 module.exports = one;
4
5 function one(node, parent) {
6   var self = this;
7   var visitors = self.visitors;
8
9   /* Fail on unknown nodes. */
10   if (typeof visitors[node.type] !== 'function') {
11     self.file.fail(
12       new Error(
13         'Missing compiler for node of type `' +
14         node.type + '`: `' + node + '`'
15       ),
16       node
17     );
18   }
19
20   return visitors[node.type].call(self, node, parent);
21 }