| 707 | var t = exports; |
| 708 | |
| 709 | function registerType(type) { |
| 710 | var is = t["is" + type]; |
| 711 | if (!is) { |
| 712 | is = t["is" + type] = function (node, opts) { |
| 713 | return t.is(type, node, opts); |
| 714 | }; |
| 715 | } |
| 716 | |
| 717 | t["assert" + type] = function (node, opts) { |
| 718 | opts = opts || {}; |
| 719 | if (!is(node, opts)) { |
| 720 | throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts)); |
| 721 | } |
| 722 | }; |
| 723 | } |
| 724 | |
| 725 | exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; |
| 726 | exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; |