| 579 | } |
| 580 | |
| 581 | private readClosingAngle(position: number): DelimiterToken { |
| 582 | this.scanner.advance(); // Skip first > |
| 583 | |
| 584 | // Check for >> |
| 585 | if (this.scanner.peek() === CHAR_ANGLE_BRACKET_CLOSE) { |
| 586 | this.scanner.advance(); |
| 587 | |
| 588 | return { type: "delimiter", value: ">>", position }; |
| 589 | } |
| 590 | |
| 591 | // Lone > - shouldn't happen in valid PDF, but handle it |
| 592 | // Return as >> anyway since > alone isn't valid |
| 593 | return { type: "delimiter", value: ">>", position }; |
| 594 | } |
| 595 | |
| 596 | private readKeyword(position: number): KeywordToken { |
| 597 | const start = this.scanner.position; |