(charCode: number)
| 43 | } |
| 44 | |
| 45 | parseUntilCharCode(charCode: number): string { |
| 46 | let startPosition = this.position; |
| 47 | let endPosition = startPosition; |
| 48 | let foundCharCode = false; |
| 49 | |
| 50 | while (endPosition < this.text.length) { |
| 51 | const code = this.text.charCodeAt(endPosition); |
| 52 | endPosition++; |
| 53 | if (code === charCode) { |
| 54 | foundCharCode = true; |
| 55 | break; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | this.position = endPosition; |
| 60 | |
| 61 | return this.text.substring(startPosition, foundCharCode ? endPosition - 1 : endPosition); |
| 62 | } |
| 63 | |
| 64 | peek(term: string): boolean { |
| 65 | this.consumeWhitespaces(); |
no test coverage detected