(str: string)
| 889 | |
| 890 | // Consumes the prefix when it is present and returns whether it has been consumed |
| 891 | private consumeOptional(str: string): boolean { |
| 892 | if (this.peekStartsWith(str)) { |
| 893 | this.remaining = this.remaining.substring(str.length); |
| 894 | return true; |
| 895 | } |
| 896 | return false; |
| 897 | } |
| 898 | |
| 899 | private capture(str: string): void { |
| 900 | if (!this.consumeOptional(str)) { |
no test coverage detected