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

Method parse

packages/effect/src/unstable/encoding/Toml.ts:54–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 }
53
54 parse(): Table {
55 while (true) {
56 this.skipDocumentWhitespace()
57 if (this.done) {
58 return this.root
59 }
60 if (this.peek() === "[") {
61 this.parseHeader()
62 } else {
63 const keys = this.parseKeyPath("=")
64 this.skipInlineWhitespace()
65 this.expect("=")
66 this.skipInlineWhitespace()
67 this.assign(this.current, keys, this.parseValue())
68 this.finishStatement()
69 }
70 }
71 }
72
73 private parseHeader(): void {
74 this.expect("[")

Callers 1

parseFunction · 0.45

Calls 9

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