MCPcopy Create free account
hub / github.com/denoland/std / #advanceWithCode

Method #advanceWithCode

xml/_tokenizer.ts:619–630  ·  view source on GitHub ↗
(code: number)

Source from the content-addressed store, hash-verified

617 }
618
619 #advanceWithCode(code: number): void {
620 if (this.#trackPosition) {
621 if (code === CC_LF) {
622 this.#line++;
623 this.#column = 1;
624 } else {
625 this.#column++;
626 }
627 this.#offset++;
628 }
629 this.#bufferIndex++;
630 }
631
632 /**
633 * Update position tracking for a region of text using indexOf for newlines.

Callers 2

processMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected