(node)
| 9 | export default function(ast, logger) { |
| 10 | traverser.replace(ast, { |
| 11 | enter(node) { |
| 12 | const matches = matchAliasedForLoop(node); |
| 13 | |
| 14 | if (matches) { |
| 15 | const warning = validateForLoop(node, matches); |
| 16 | if (warning) { |
| 17 | logger.warn(...warning, 'for-each'); |
| 18 | return; |
| 19 | } |
| 20 | |
| 21 | return withComments(node, createForEach(matches)); |
| 22 | } |
| 23 | |
| 24 | if (node.type === 'ForStatement') { |
| 25 | logger.warn(node, 'Unable to transform for loop', 'for-each'); |
| 26 | } |
| 27 | } |
| 28 | }); |
| 29 | } |
| 30 |
nothing calls this directly
no test coverage detected
searching dependent graphs…