(state: CursorState)
| 1689 | } |
| 1690 | |
| 1691 | protected advanceState(state: CursorState) { |
| 1692 | if (state.offset >= this.end) { |
| 1693 | this.state = state; |
| 1694 | throw new CursorError('Unexpected character "EOF"', this); |
| 1695 | } |
| 1696 | const currentChar = this.charAt(state.offset); |
| 1697 | if (currentChar === chars.$LF) { |
| 1698 | state.line++; |
| 1699 | state.column = 0; |
| 1700 | } else if (!chars.isNewLine(currentChar)) { |
| 1701 | state.column++; |
| 1702 | } |
| 1703 | state.offset++; |
| 1704 | this.updatePeek(state); |
| 1705 | } |
| 1706 | |
| 1707 | protected updatePeek(state: CursorState): void { |
| 1708 | state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset); |
no test coverage detected