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

Method readKeyword

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

Source from the content-addressed store, hash-verified

594 }
595
596 private readKeyword(position: number): KeywordToken {
597 const start = this.scanner.position;
598
599 while (isRegularChar(this.scanner.peek())) {
600 this.scanner.advance();
601 }
602
603 const value = this.extractText(start, this.scanner.position);
604
605 return { type: "keyword", value, position };
606 }
607
608 private extractText(start: number, end: number): string {
609 const bytes = this.scanner.bytes.subarray(start, end);

Callers 1

readTokenMethod · 0.95

Calls 4

extractTextMethod · 0.95
isRegularCharFunction · 0.90
advanceMethod · 0.80
peekMethod · 0.45

Tested by

no test coverage detected