MCPcopy Create free account
hub / github.com/denoland/std / readLineBreak

Method readLineBreak

yaml/_loader_state.ts:552–568  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

550 return result;
551 }
552 readLineBreak() {
553 const ch = this.#scanner.peek();
554
555 if (ch === LINE_FEED) {
556 this.#scanner.next();
557 } else if (ch === CARRIAGE_RETURN) {
558 this.#scanner.next();
559 if (this.#scanner.peek() === LINE_FEED) {
560 this.#scanner.next();
561 }
562 } else {
563 throw this.#createError("Cannot read line: line break not found");
564 }
565
566 this.line += 1;
567 this.lineStart = this.#scanner.position;
568 }
569 skipSeparationSpace(allowComments: boolean, checkIndent: number): number {
570 let lineBreaks = 0;
571 let ch = this.#scanner.peek();

Callers 3

skipSeparationSpaceMethod · 0.95
readBlockScalarMethod · 0.95
readDirectivesMethod · 0.95

Calls 3

#createErrorMethod · 0.95
peekMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected