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

Method parse

packages/effect/src/encoding/Toml.ts:83–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 }
82
83 parse(): Table {
84 while (true) {
85 this.skipWhitespace()
86 if (this.done) {
87 return this.root
88 }
89 if (this.peek() === "[") {
90 this.parseHeader()
91 } else {
92 const keys = this.parseKeyPath("=")
93 this.skipInlineWhitespace()
94 this.expect("=")
95 this.skipInlineWhitespace()
96 this.assign(this.current, keys, this.parseValue())
97 this.finishStatement()
98 }
99 }
100 }
101
102 private parseHeader(): void {
103 this.expect("[")

Callers 1

parseFunction · 0.45

Calls 9

skipWhitespaceMethod · 0.95
peekMethod · 0.95
parseHeaderMethod · 0.95
parseKeyPathMethod · 0.95
skipInlineWhitespaceMethod · 0.95
expectMethod · 0.95
assignMethod · 0.95
parseValueMethod · 0.95
finishStatementMethod · 0.95

Tested by

no test coverage detected