* @param {function} traverse * @param {object} node * @param {array} path * @param {object} state
(traverse, node, path, state)
| 13677 | * @param {object} state |
| 13678 | */ |
| 13679 | function visitClassMethod(traverse, node, path, state) { |
| 13680 | if (!state.g.opts.es5 && (node.kind === 'get' || node.kind === 'set')) { |
| 13681 | throw new Error( |
| 13682 | 'This transform does not support ' + node.kind + 'ter methods for ES6 ' + |
| 13683 | 'classes. (line: ' + node.loc.start.line + ', col: ' + |
| 13684 | node.loc.start.column + ')' |
| 13685 | ); |
| 13686 | } |
| 13687 | state = utils.updateState(state, { |
| 13688 | methodNode: node |
| 13689 | }); |
| 13690 | utils.catchup(node.range[0], state); |
| 13691 | path.unshift(node); |
| 13692 | traverse(node.value, path, state); |
| 13693 | path.shift(); |
| 13694 | return false; |
| 13695 | } |
| 13696 | visitClassMethod.test = function(node, path, state) { |
| 13697 | return node.type === Syntax.MethodDefinition; |
| 13698 | }; |
nothing calls this directly
no test coverage detected