()
| 388 | } |
| 389 | |
| 390 | private parseInlineTable(): Table { |
| 391 | this.expect("{") |
| 392 | const output = makeTable() |
| 393 | this.skipInlineWhitespace() |
| 394 | if (this.peek() === "}") { |
| 395 | this.advance() |
| 396 | return output |
| 397 | } |
| 398 | while (true) { |
| 399 | const keys = this.parseKeyPath("=") |
| 400 | this.skipInlineWhitespace() |
| 401 | this.expect("=") |
| 402 | this.skipInlineWhitespace() |
| 403 | this.assign(output, keys, this.parseValue()) |
| 404 | this.skipInlineWhitespace() |
| 405 | if (this.peek() === "}") { |
| 406 | this.advance() |
| 407 | return output |
| 408 | } |
| 409 | this.expect(",") |
| 410 | this.skipInlineWhitespace() |
| 411 | if (this.peek() === "}") { |
| 412 | this.fail("Inline tables cannot end with a trailing comma") |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | private skipDocumentWhitespace(): void { |
| 418 | while (!this.done) { |
no test coverage detected