()
| 723 | } |
| 724 | |
| 725 | private parseMapping(): YamlRecord { |
| 726 | this.expect("{") |
| 727 | const mapping = new MappingBuilder(this.merges) |
| 728 | this.skipWhitespace() |
| 729 | if (this.peek() === "}") { |
| 730 | this.index++ |
| 731 | return mapping.output |
| 732 | } |
| 733 | while (true) { |
| 734 | this.skipWhitespace() |
| 735 | this.parseMappingEntry(mapping) |
| 736 | this.skipWhitespace() |
| 737 | if (this.peek() === "}") { |
| 738 | this.index++ |
| 739 | return mapping.output |
| 740 | } |
| 741 | this.expect(",") |
| 742 | this.skipWhitespace() |
| 743 | if (this.peek() === "}") { |
| 744 | this.index++ |
| 745 | return mapping.output |
| 746 | } |
| 747 | } |
| 748 | } |
| 749 | |
| 750 | // YAML 1.2.2 §7.4: a key followed by `,` or the end of the collection has an empty value. |
| 751 | private parseMappingEntry(mapping: MappingBuilder): void { |
no test coverage detected