Files
pdfcraft/vendor/hayro-postscript
mtlcl410andClaude Opus 5.5 fe5fa9e908 fix(render): a number token the scanner can't read is skipped whole, so 1beginbfchar doesn't start mappings (hayro-postscript patch 2)
A number read stops at the first byte that can't be part of a number,
which may be inside the token: `parse_object_or_skip` then read the rest
(`beginbfchar` in `1beginbfchar`) as a token of its own, and the pairs
after it became mappings. The rest of the token is now skipped with the
failed number, one failure per token, as PostScript reads a run of
regular characters as one token.

The render test's run of unreadable tokens before the mappings is spaced:
a run of `-` with nothing between them is one token now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn
2026-11-07 08:26:11 +08:00
..

hayro-postscript

Crates.io Documentation

A lightweight PostScript scanner.

This crate provides a scanner for tokenizing PostScript programs into typed objects. It currently only implements a very small subset of the PostScript language, with the main goal of being enough to parse CMAP files, but the scope might be expanded upon in the future.

The supported types include integers and real numbers, name objects, strings and arrays. Unsupported is anything else, including dictionaries, procedures, etc. An error will be returned in case any of these is encountered.

Safety

This crate forbids unsafe code via a crate-level attribute.

License

Licensed under either of

at your option.