(state: CursorState)
| 1671 | } |
| 1672 | |
| 1673 | protected advanceState(state: CursorState) { |
| 1674 | if (state.offset >= this.end) { |
| 1675 | this.state = state; |
| 1676 | throw new CursorError('Unexpected character "EOF"', this); |
| 1677 | } |
| 1678 | const currentChar = this.charAt(state.offset); |
| 1679 | if (currentChar === chars.$LF) { |
| 1680 | state.line++; |
| 1681 | state.column = 0; |
| 1682 | } else if (!chars.isNewLine(currentChar)) { |
| 1683 | state.column++; |
| 1684 | } |
| 1685 | state.offset++; |
| 1686 | this.updatePeek(state); |
| 1687 | } |
| 1688 | |
| 1689 | protected updatePeek(state: CursorState): void { |
| 1690 | state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset); |
no test coverage detected