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

Method parseInlineTable

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

Source from the content-addressed store, hash-verified

442 }
443
444 private parseInlineTable(): Table {
445 this.expect("{")
446 const output = makeTable()
447 while (true) {
448 this.skipWhitespace()
449 if (this.peek() === "}") {
450 this.advance()
451 return output
452 }
453 const keys = this.parseKeyPath("=")
454 this.skipInlineWhitespace()
455 this.expect("=")
456 this.skipInlineWhitespace()
457 this.assign(output, keys, this.parseValue())
458 this.skipWhitespace()
459 if (this.peek() === "}") {
460 this.advance()
461 return output
462 }
463 this.expect(",")
464 }
465 }
466
467 private skipInlineWhitespace(): void {
468 while (this.peek() === " " || this.peek() === "\t") {

Callers 1

parseValueMethod · 0.95

Calls 9

expectMethod · 0.95
skipWhitespaceMethod · 0.95
peekMethod · 0.95
advanceMethod · 0.95
parseKeyPathMethod · 0.95
skipInlineWhitespaceMethod · 0.95
assignMethod · 0.95
parseValueMethod · 0.95
makeTableFunction · 0.85

Tested by

no test coverage detected