* Executes a callback in the provided context.
(context: ParseContextFlags, cb: () => T)
| 687 | * Executes a callback in the provided context. |
| 688 | */ |
| 689 | private withContext<T>(context: ParseContextFlags, cb: () => T): T { |
| 690 | this.context |= context; |
| 691 | const ret = cb(); |
| 692 | this.context ^= context; |
| 693 | return ret; |
| 694 | } |
| 695 | |
| 696 | private consumeOptionalCharacter(code: number): boolean { |
| 697 | if (this.next.isCharacter(code)) { |