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

Method #advanceWithCode

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

Source from the content-addressed store, hash-verified

568 }
569
570 #advanceWithCode(code: number): void {
571 if (this.#trackPosition) {
572 if (code === CC_LF) {
573 this.#line++;
574 this.#column = 1;
575 } else {
576 this.#column++;
577 }
578 this.#offset++;
579 }
580 this.#bufferIndex++;
581 }
582
583 /**
584 * 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