()
| 679 | } |
| 680 | |
| 681 | private parseSequence(): Array<unknown> { |
| 682 | this.expect("[") |
| 683 | const output: Array<unknown> = [] |
| 684 | this.skipWhitespace() |
| 685 | if (this.peek() === "]") { |
| 686 | this.index++ |
| 687 | return output |
| 688 | } |
| 689 | while (true) { |
| 690 | output.push(this.parseSequenceEntry()) |
| 691 | this.skipWhitespace() |
| 692 | if (this.peek() === "]") { |
| 693 | this.index++ |
| 694 | return output |
| 695 | } |
| 696 | this.expect(",") |
| 697 | this.skipWhitespace() |
| 698 | if (this.peek() === "]") { |
| 699 | this.index++ |
| 700 | return output |
| 701 | } |
| 702 | } |
| 703 | } |
| 704 | |
| 705 | // YAML 1.2.2 §7.4.1: a sequence entry followed by `:` is a single `key: value` pair, read as a |
| 706 | // one-entry mapping. Like any implicit key, its key is on one line. |
no test coverage detected