(
indexingNode: Node,
{ loc: start }: Node = indexingNode,
{ loc: end }: Node = indexingNode,
)
| 17 | const output: FlatTree = []; |
| 18 | |
| 19 | const push = ( |
| 20 | indexingNode: Node, |
| 21 | { loc: start }: Node = indexingNode, |
| 22 | { loc: end }: Node = indexingNode, |
| 23 | ) => { |
| 24 | if (!start || !end) { |
| 25 | throw new Error('should include locations'); |
| 26 | } |
| 27 | |
| 28 | output.push({ start: start.start, end: end.end, depth: stack.length }); |
| 29 | stack.push(indexingNode); |
| 30 | }; |
| 31 | |
| 32 | // nodes ignored because they're already captured in the top |
| 33 | // level statement, such as the body of `for` loops. |
no test coverage detected