MCPcopy Index your code
hub / github.com/angular/angular / advanceState

Method advanceState

packages/compiler/src/ml_parser/lexer.ts:1673–1687  ·  view source on GitHub ↗
(state: CursorState)

Source from the content-addressed store, hash-verified

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);

Callers 2

advanceMethod · 0.95
processEscapeSequenceMethod · 0.80

Calls 2

charAtMethod · 0.95
updatePeekMethod · 0.95

Tested by

no test coverage detected