()
| 493 | } |
| 494 | |
| 495 | private skipIgnored(): void { |
| 496 | while (this.index < this.lines.length) { |
| 497 | const line = this.lines[this.index] |
| 498 | if (line.text.length === 0 || line.text.startsWith("%") || line.text === "---") { |
| 499 | this.index++ |
| 500 | } else if (line.text === "...") { |
| 501 | this.index++ |
| 502 | while (this.index < this.lines.length && this.lines[this.index].text.length === 0) this.index++ |
| 503 | if (this.index < this.lines.length) { |
| 504 | this.fail(this.lines[this.index], "Multiple YAML documents are not supported") |
| 505 | } |
| 506 | } else { |
| 507 | return |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | private fail(line: Line, message: string): never { |
| 513 | throw new SyntaxError(`${message} at line ${line.number}`) |
no test coverage detected