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

Method parseDocument

packages/effect/src/encoding/Yaml.ts:1051–1061  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1049 }
1050
1051 private parseDocument(): unknown {
1052 const start = this.lines[this.index]
1053 if (isDocumentStart(start)) this.index++
1054 // Scanning forward from the current line keeps a stream of many documents linear.
1055 let end = this.index
1056 while (end < this.lines.length && !isDocumentMarker(this.lines[end])) end++
1057 this.documentEnd = end
1058 const value = this.parseDocumentContent(start)
1059 this.documentEnd = this.lines.length
1060 return value
1061 }
1062
1063 private parseDocumentContent(start: Line): unknown {
1064 if (isDocumentStart(start)) {

Callers 1

parseStreamMethod · 0.95

Calls 3

parseDocumentContentMethod · 0.95
isDocumentStartFunction · 0.85
isDocumentMarkerFunction · 0.85

Tested by

no test coverage detected