(path)
| 123 | } |
| 124 | |
| 125 | function replaceAndSkip(path) { |
| 126 | if (!babelTypes.isLabeledStatement(path.parent) || |
| 127 | !babelTypes.isLoop(path.node)) { |
| 128 | // Don't wrap loops with labels as it makes continue |
| 129 | // statements syntactically invalid. We wrap the label |
| 130 | // instead below. |
| 131 | path.replaceWith(wrapTryCatch(path.node)); |
| 132 | } |
| 133 | // Prevent infinite looping. |
| 134 | path.skip(); |
| 135 | } |
| 136 | |
| 137 | function replaceBlockStatementAndSkip(path) { |
| 138 | path.replaceWith(wrapBlockWithTryCatch(path.node)); |
no test coverage detected