(chars: string)
| 592 | } |
| 593 | |
| 594 | private _attemptStr(chars: string): boolean { |
| 595 | const len = chars.length; |
| 596 | if (this._cursor.charsLeft() < len) { |
| 597 | return false; |
| 598 | } |
| 599 | const initialPosition = this._cursor.clone(); |
| 600 | for (let i = 0; i < len; i++) { |
| 601 | if (!this._attemptCharCode(chars.charCodeAt(i))) { |
| 602 | // If attempting to parse the string fails, we want to reset the parser |
| 603 | // to where it was before the attempt |
| 604 | this._cursor = initialPosition; |
| 605 | return false; |
| 606 | } |
| 607 | } |
| 608 | return true; |
| 609 | } |
| 610 | |
| 611 | private _attemptStrCaseInsensitive(chars: string): boolean { |
| 612 | for (let i = 0; i < chars.length; i++) { |
no test coverage detected