(str: string)
| 111 | } |
| 112 | |
| 113 | skipToString(str: string): boolean { |
| 114 | const start = this.pos; |
| 115 | while (!this.atEnd) { |
| 116 | if (this.match(str)) return true; |
| 117 | this.consume(); |
| 118 | } |
| 119 | this.pos = start; // Reset position if match fails |
| 120 | return false; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /** Parse an escape sequence such as: |