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

Method parseObject

src/parser/object-parser.ts:60–77  ·  view source on GitHub ↗

* Parse a single object at current position. * Returns null if at EOF.

()

Source from the content-addressed store, hash-verified

58 * Returns null if at EOF.
59 */
60 parseObject(): ParseResult | null {
61 if (++this.depth > ObjectParser.MAX_DEPTH) {
62 this.depth--;
63 throw new ObjectParseError("Maximum nesting depth exceeded");
64 }
65
66 try {
67 this.ensureBufferFilled();
68
69 if (this.buf1 === null || this.buf1.type === "eof") {
70 return null;
71 }
72
73 return this.parseValue();
74 } finally {
75 this.depth--;
76 }
77 }
78
79 private ensureBufferFilled(): void {
80 if (this.buf1 === null) {

Callers 8

parseObjectMethod · 0.95
parseTableMethod · 0.95
getObjectMethod · 0.95
parseArrayMethod · 0.95
parseDictMethod · 0.95
parseObjectAtMethod · 0.95

Calls 2

ensureBufferFilledMethod · 0.95
parseValueMethod · 0.95

Tested by

no test coverage detected