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

Method skipIgnored

packages/effect/src/unstable/encoding/Yaml.ts:495–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

493 }
494
495 private skipIgnored(): void {
496 while (this.index < this.lines.length) {
497 const line = this.lines[this.index]
498 if (line.text.length === 0 || line.text.startsWith("%") || line.text === "---") {
499 this.index++
500 } else if (line.text === "...") {
501 this.index++
502 while (this.index < this.lines.length && this.lines[this.index].text.length === 0) this.index++
503 if (this.index < this.lines.length) {
504 this.fail(this.lines[this.index], "Multiple YAML documents are not supported")
505 }
506 } else {
507 return
508 }
509 }
510 }
511
512 private fail(line: Line, message: string): never {
513 throw new SyntaxError(`${message} at line ${line.number}`)

Callers 5

parseMethod · 0.95
parseNodeMethod · 0.95
parseMappingMethod · 0.95
parseSequenceMethod · 0.95
parseNodeValueMethod · 0.95

Calls 1

failMethod · 0.95

Tested by

no test coverage detected