MCPcopy Create free account
hub / github.com/LibPDF-js/core / readClosingAngle

Method readClosingAngle

src/parser/token-reader.ts:581–594  ·  view source on GitHub ↗
(position: number)

Source from the content-addressed store, hash-verified

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;

Callers 1

readTokenMethod · 0.95

Calls 2

advanceMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected