| 693 | var t = exports; |
| 694 | |
| 695 | function registerType(type) { |
| 696 | var is = t["is" + type]; |
| 697 | if (!is) { |
| 698 | is = t["is" + type] = function (node, opts) { |
| 699 | return t.is(type, node, opts); |
| 700 | }; |
| 701 | } |
| 702 | |
| 703 | t["assert" + type] = function (node, opts) { |
| 704 | opts = opts || {}; |
| 705 | if (!is(node, opts)) { |
| 706 | throw new Error("Expected type " + (0, _stringify2.default)(type) + " with option " + (0, _stringify2.default)(opts)); |
| 707 | } |
| 708 | }; |
| 709 | } |
| 710 | |
| 711 | exports.VISITOR_KEYS = _definitions.VISITOR_KEYS; |
| 712 | exports.ALIAS_KEYS = _definitions.ALIAS_KEYS; |