MCPcopy Create free account
hub / github.com/Effect-TS/effect / nextChunk

Method nextChunk

packages/effect/src/encoding/Yaml.ts:863–871  ·  view source on GitHub ↗
(mode: "quoted" | "plain" | "token")

Source from the content-addressed store, hash-verified

861 // Preserve "\n" on continuation lines. Inside quotes, `#` is content; inside plain scalars,
862 // quotes are content. Token mode permits new quoted scalars.
863 private nextChunk(mode: "quoted" | "plain" | "token"): boolean {
864 const next = this.nextLine(mode === "quoted")
865 if (next === undefined) return false
866 this.offset += this.line.length
867 this.comment = false
868 this.line = `\n${mode === "quoted" ? next : this.stripComment(next, mode === "plain")}`
869 this.index = 0
870 return true
871 }
872
873 // Scan comments with the parser's collection and token context, preserving quoted hashes.
874 private stripComment(text: string, plain: boolean): string {

Callers 4

readQuotedMethod · 0.95
readUntilMethod · 0.95
skipWhitespaceMethod · 0.95
peekMethod · 0.95

Calls 1

stripCommentMethod · 0.95

Tested by

no test coverage detected