(state: CursorState)
| 1522 | } |
| 1523 | |
| 1524 | protected advanceState(state: CursorState) { |
| 1525 | if (state.offset >= this.end) { |
| 1526 | this.state = state; |
| 1527 | throw new CursorError('Unexpected character "EOF"', this); |
| 1528 | } |
| 1529 | const currentChar = this.charAt(state.offset); |
| 1530 | if (currentChar === chars.$LF) { |
| 1531 | state.line++; |
| 1532 | state.column = 0; |
| 1533 | } else if (!chars.isNewLine(currentChar)) { |
| 1534 | state.column++; |
| 1535 | } |
| 1536 | state.offset++; |
| 1537 | this.updatePeek(state); |
| 1538 | } |
| 1539 | |
| 1540 | protected updatePeek(state: CursorState): void { |
| 1541 | state.peek = state.offset >= this.end ? chars.$EOF : this.charAt(state.offset); |
no test coverage detected