A spliced directive without the `//` comment that ends it, one in a string literal aside.
(text: string)
| 439 | |
| 440 | /** A spliced directive without the `//` comment that ends it, one in a string literal aside. */ |
| 441 | function withoutLineComment(text: string): string { |
| 442 | for (let i = 0; i < text.length; i++) { |
| 443 | const c = text[i]; |
| 444 | if (c === '"' || c === "'") i = quotedEnd(text, i) - 1; |
| 445 | else if (c === '/' && text[i + 1] === '/') return text.slice(0, i); |
| 446 | } |
| 447 | return text; |
| 448 | } |
| 449 | |
| 450 | /** Past blanks and comments from `i`. */ |
| 451 | function skipBlankAndComments(source: string, i: number): number { |
no test coverage detected