()
| 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("[") |
no test coverage detected