the control character escaped after a backslash, or the backslash as written
()
| 120 | |
| 121 | /** the control character escaped after a backslash, or the backslash as written */ |
| 122 | private shiftControlEscape(): string { |
| 123 | const peek = this.peek |
| 124 | if (peek in namedControlEscapes) { |
| 125 | this.shift() |
| 126 | return namedControlEscapes[peek as keyof NamedControlEscapes] |
| 127 | } |
| 128 | if (peek === "u") { |
| 129 | const code = this.chars.slice(this.i + 1, this.i + 5).join("") |
| 130 | if (code.toLowerCase() in controlEscapes) { |
| 131 | this.jumpForward(5) |
| 132 | return controlEscapes[code.toLowerCase() as keyof ControlEscapes] |
| 133 | } |
| 134 | } |
| 135 | return `${Backslash}${this.shift()}` |
| 136 | } |
| 137 | |
| 138 | shiftUntilNext(charOrSet: string | KeySet): string { |
| 139 | return typeof charOrSet === "string" ? |
no test coverage detected