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

Method parseNode

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

Source from the content-addressed store, hash-verified

340 }
341
342 private parseNode(indent: number): unknown {
343 this.skipIgnored()
344 const line = this.lines[this.index]
345 if (line === undefined) return null
346 if (line.indent !== indent) this.fail(line, `Expected indentation of ${indent} spaces`)
347 if (line.text === "-" || line.text.startsWith("- ")) return this.parseSequence(indent)
348 if (mappingSeparator(line.text) !== -1) return this.parseMapping(indent)
349 this.index++
350 return this.parseInlineValue(line.text)
351 }
352
353 private parseMapping(indent: number): YamlRecord {
354 const output: YamlRecord = {}

Callers 2

parseMethod · 0.95
parseNodeValueMethod · 0.95

Calls 6

skipIgnoredMethod · 0.95
failMethod · 0.95
parseSequenceMethod · 0.95
parseMappingMethod · 0.95
parseInlineValueMethod · 0.95
mappingSeparatorFunction · 0.85

Tested by

no test coverage detected