Skip to content

refactor: share whole-token integer parsing - #1176

Merged
andiwand merged 1 commit into
mainfrom
review/158-integer-parsing-util
Oct 6, 2026
Merged

andiwand merged 1 commit into
mainfrom
review/158-integer-parsing-util

Conversation

@andiwand

@andiwand andiwand commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Integer parsers repeated whole-token checks, overflow handling and leading + stripping. Add util::number::parse_integer<T> with explicit radix and allow_plus options, and use it across PDF, OOXML, ODF, Type 1 fonts, Markdown entities and number formats. Format-specific whitespace, bounds and failure handling stay at the call sites, so a lenient caller keeps its fallback; prefix parsers remain separate.

Adds four utility tests and one assertion to the existing PDF unsigned-integer test, reusing the format suites for integration coverage.

Validation: 290 targeted tests passed, plus the added PDF sign assertion; native build, clang-format 18 and clang-tidy passed (existing analyzer advisories remain). Object compilation passed with emsdk 3.1.73, NDK 28.1 and the iOS 15 deployment target.

@andiwand
andiwand force-pushed the review/157-utf-api-boundary branch from ecfc159 to 3581f3b Compare October 6, 2026 19:56
Base automatically changed from review/157-utf-api-boundary to main October 6, 2026 19:58
@andiwand
andiwand force-pushed the review/158-integer-parsing-util branch from fa8b878 to a02580e Compare October 6, 2026 20:05
@andiwand
andiwand merged commit 078390a into main Oct 6, 2026
10 of 23 checks passed
@andiwand
andiwand deleted the review/158-integer-parsing-util branch October 6, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant