(scanner: Scanner, quote: string)
| 862 | } |
| 863 | |
| 864 | function consumeString(scanner: Scanner, quote: string): string { |
| 865 | const source = scanner.source; |
| 866 | const start = scanner.index; |
| 867 | scanner.index += 1; |
| 868 | |
| 869 | while (scanner.index < source.length) { |
| 870 | const ch = asChar(source, scanner.index); |
| 871 | if (ch === "\\") { |
| 872 | scanner.index += Math.min(2, source.length - scanner.index); |
| 873 | continue; |
| 874 | } |
| 875 | scanner.index += 1; |
| 876 | if (ch === quote) break; |
| 877 | } |
| 878 | |
| 879 | return source.slice(start, scanner.index); |
| 880 | } |
| 881 | |
| 882 | function consumeCSharpVerbatimString(scanner: Scanner): string { |
| 883 | const source = scanner.source; |
no test coverage detected