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

Method parseDelimiter

src/parser/object-parser.ts:222–237  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

220 }
221
222 private parseDelimiter(value: string): ParseResult {
223 switch (value) {
224 case "[":
225 return this.parseArray();
226
227 case "<<":
228 return this.parseDict();
229
230 case "]":
231 case ">>":
232 throw new ObjectParseError(`Unexpected delimiter: ${value}`);
233
234 default:
235 throw new ObjectParseError(`Unknown delimiter: ${value}`);
236 }
237 }
238
239 private parseArray(): ParseResult {
240 this.shift(); // consume '['

Callers 1

parseValueMethod · 0.95

Calls 2

parseArrayMethod · 0.95
parseDictMethod · 0.95

Tested by

no test coverage detected