(str: string)
| 804 | |
| 805 | // Consumes the prefix when it is present and returns whether it has been consumed |
| 806 | private consumeOptional(str: string): boolean { |
| 807 | if (this.peekStartsWith(str)) { |
| 808 | this.remaining = this.remaining.substring(str.length); |
| 809 | return true; |
| 810 | } |
| 811 | return false; |
| 812 | } |
| 813 | |
| 814 | private capture(str: string): void { |
| 815 | if (!this.consumeOptional(str)) { |
no test coverage detected