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

Method readLineBreak

yaml/_loader_state.ts:541–557  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

539 return result;
540 }
541 readLineBreak() {
542 const ch = this.#scanner.peek();
543
544 if (ch === LINE_FEED) {
545 this.#scanner.next();
546 } else if (ch === CARRIAGE_RETURN) {
547 this.#scanner.next();
548 if (this.#scanner.peek() === LINE_FEED) {
549 this.#scanner.next();
550 }
551 } else {
552 throw this.#createError("Cannot read line: line break not found");
553 }
554
555 this.line += 1;
556 this.lineStart = this.#scanner.position;
557 }
558 skipSeparationSpace(allowComments: boolean, checkIndent: number): number {
559 let lineBreaks = 0;
560 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