pdftract/crates/pdftract-core
jedarden ed5d7af299 fix(pdftract-2hm4): rename lexer diagnostic codes to use STRUCT_ prefix
Rename all DiagCode enum variants in the lexer to use the STRUCT_ prefix
to match the specification. This clarifies that these diagnostics relate
to structural/lexical issues in PDF documents.

Changes:
- InvalidName -> StructInvalidName
- InvalidHex -> StructInvalidHex
- InvalidOctal -> StructInvalidOctal
- InvalidStreamHeader -> StructInvalidStreamHeader
- UnexpectedEof -> StructUnexpectedEof
- UnterminatedString -> StructUnterminatedString

The hex string lexer implementation was already correct, with proper
handling of:
- Hex digit pair decoding
- Embedded whitespace (PDF spec 7.2.2)
- Odd-length zero padding: <4> -> \x40 (dangling nibble is HIGH)
- Invalid character diagnostics
- Unterminated string diagnostics

All 16 hex string tests pass, including critical tests for odd-length
padding and error handling.

See: notes/pdftract-2hm4.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 01:55:27 -04:00
..
src fix(pdftract-2hm4): rename lexer diagnostic codes to use STRUCT_ prefix 2026-05-18 01:55:27 -04:00
tests feat(pdftract-5omc): implement SDK conformance test runner pattern 2026-05-18 01:22:23 -04:00
Cargo.toml feat(pdftract-5omc): implement SDK conformance test runner pattern 2026-05-18 01:22:23 -04:00