`x` starts strictly after `y` starts and before `y` ends.
(x: HopSite, y: HopSite)
| 1744 | |
| 1745 | /** `x` starts strictly after `y` starts and before `y` ends. */ |
| 1746 | function hopInside(x: HopSite, y: HopSite): boolean { |
| 1747 | const afterStart = x.line > y.line || (x.line === y.line && x.column > y.column); |
| 1748 | const beforeEnd = x.line < y.end.line || (x.line === y.end.line && x.column < y.end.column); |
| 1749 | return afterStart && beforeEnd; |
| 1750 | } |
| 1751 | |
| 1752 | function posix(p: string): string { |
| 1753 | return p.replace(/\\/g, '/'); |