(state: CursorState)
| 1704 | } |
| 1705 | |
| 1706 | protected advanceState(state: CursorState) { |
| 1707 | if (state.offset >= this.end) { |
| 1708 | this.state = state; |
| 1709 | throw new CursorError('Unexpected character "EOF"', this); |
| 1710 | } |
| 1711 | const currentChar = this.charAt(state.offset); |
| 1712 | if (currentChar === chars.$LF) { |
| 1713 | state.line++; |
| 1714 | state.column = 0; |
| 1715 | } else if (!chars.isNewLine(currentChar)) { |
| 1716 | state.column++; |
| 1717 | } |
| 1718 | state.offset++; |
| 1719 | this.updatePeek(state); |
| 1720 | } |
| 1721 | |
| 1722 | protected updatePeek(state: CursorState): void { |
| 1723 | state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset); |
no test coverage detected