| 243 | |
| 244 | /** The offset after the quoted JavaScript string at `at`, or -1: a string ends on its own line. */ |
| 245 | const stringEnd = (at: number, quote: number): number => { |
| 246 | for (let j = at + 1; j < n; j++) { |
| 247 | const c = source.charCodeAt(j); |
| 248 | if (c === Ch.Backslash) j++; |
| 249 | else if (c === quote) return j + 1; |
| 250 | else if (c === Ch.Newline) break; |
| 251 | } |
| 252 | return -1; |
| 253 | }; |
| 254 | |
| 255 | /** The offset after the template literal at `at`, or -1. */ |
| 256 | const templateEnd = (at: number, nesting: number): number => { |