A top-level `:` that is no part of a `::`, between `from` and `to`; -1 for none.
(code: string, from: number, to: number, close: Map<number, number>)
| 254 | |
| 255 | /** A top-level `:` that is no part of a `::`, between `from` and `to`; -1 for none. */ |
| 256 | function topColon(code: string, from: number, to: number, close: Map<number, number>): number { |
| 257 | const at = walkTop(code, from, to, close, true, (i) => code[i] === ':' && code[i + 1] !== ':' && code[i - 1] !== ':'); |
| 258 | return at < to ? at : -1; |
| 259 | } |
| 260 | |
| 261 | /** Whether the keyword `word` starts at `i`, a whole word. */ |
| 262 | function wordAt(code: string, i: number, word: string): boolean { |
no test coverage detected