(n)
| 56 | * @returns {Node[] | undefined} result |
| 57 | */ |
| 58 | const enterNode = (n) => { |
| 59 | if (!n) return; |
| 60 | const r = n.range; |
| 61 | if (r && r[0] <= nr[0] && r[1] >= nr[1]) { |
| 62 | const path = getPathInAst(n, node); |
| 63 | if (path) { |
| 64 | path.push(n); |
| 65 | return path; |
| 66 | } |
| 67 | } |
| 68 | }; |
| 69 | |
| 70 | if (Array.isArray(ast)) { |
| 71 | // sibling ranges are ordered and disjoint; binary search the container |
no test coverage detected