The `\r`s of `text` in [from, to), which a column doesn't count.
(text: string, from: number, to: number)
| 41 | |
| 42 | /** The `\r`s of `text` in [from, to), which a column doesn't count. */ |
| 43 | function carriageReturnsIn(text: string, from: number, to: number): number { |
| 44 | let count = 0; |
| 45 | for (let k = from; k < to; k++) if (text.charCodeAt(k) === CARRIAGE_RETURN) count++; |
| 46 | return count; |
| 47 | } |
| 48 | |
| 49 | /** Where a string or character literal opened at `open` ends: past its closing quote, or at the end of the line. */ |
| 50 | function literalEnd(text: string, open: number, quote: number): number { |