()
| 222 | } |
| 223 | |
| 224 | private parseSequence(): Array<unknown> { |
| 225 | this.expect("[") |
| 226 | const output: Array<unknown> = [] |
| 227 | this.skipWhitespace() |
| 228 | if (this.peek() === "]") { |
| 229 | this.index++ |
| 230 | return output |
| 231 | } |
| 232 | while (true) { |
| 233 | output.push(this.parseValue()) |
| 234 | this.skipWhitespace() |
| 235 | if (this.peek() === "]") { |
| 236 | this.index++ |
| 237 | return output |
| 238 | } |
| 239 | this.expect(",") |
| 240 | this.skipWhitespace() |
| 241 | if (this.peek() === "]") { |
| 242 | this.index++ |
| 243 | return output |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | private parseMapping(): YamlRecord { |
| 249 | this.expect("{") |
no test coverage detected