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

Method parseMapping

packages/effect/src/unstable/encoding/Yaml.ts:353–365  ·  view source on GitHub ↗
(indent: number)

Source from the content-addressed store, hash-verified

351 }
352
353 private parseMapping(indent: number): YamlRecord {
354 const output: YamlRecord = {}
355 while (true) {
356 this.skipIgnored()
357 const line = this.lines[this.index]
358 if (line === undefined || line.indent < indent) return output
359 if (line.indent > indent) this.fail(line, `Unexpected indentation of ${line.indent} spaces`)
360 const separator = mappingSeparator(line.text)
361 if (separator === -1) return output
362 this.index++
363 this.parseMappingEntry(output, line.text, separator, indent, line)
364 }
365 }
366
367 private parseMappingEntry(
368 output: YamlRecord,

Callers 1

parseNodeMethod · 0.95

Calls 4

skipIgnoredMethod · 0.95
failMethod · 0.95
parseMappingEntryMethod · 0.95
mappingSeparatorFunction · 0.85

Tested by

no test coverage detected