| 431 | |
| 432 | // Reads a template literal's text from `i` up to its closing backtick or a `${`. |
| 433 | const templateText = (): void => { |
| 434 | while (i < n) { |
| 435 | const c = source.charCodeAt(i); |
| 436 | if (c === 92 /* \ */) { |
| 437 | if (source.charCodeAt(i + 1) === 10) newline(i + 1); |
| 438 | i += 2; |
| 439 | continue; |
| 440 | } |
| 441 | if (c === 96 /* ` */) { |
| 442 | i++; |
| 443 | return; |
| 444 | } |
| 445 | if (c === 36 /* $ */ && source.charCodeAt(i + 1) === 123 /* { */) { |
| 446 | templates.push(depth); |
| 447 | i += 2; |
| 448 | return; |
| 449 | } |
| 450 | if (c === 10) newline(i); |
| 451 | i++; |
| 452 | } |
| 453 | }; |
| 454 | |
| 455 | while (i < n) { |
| 456 | const c = source.charCodeAt(i); |