Skip to content

#215 Add NumberStyles MappaSettings for string-to-numeric parsing#226

Merged
sanelli merged 4 commits into
mainfrom
215-support-numberstyles-for-parse-for-all-numeric-types
Jun 21, 2026
Merged

#215 Add NumberStyles MappaSettings for string-to-numeric parsing#226
sanelli merged 4 commits into
mainfrom
215-support-numberstyles-for-parse-for-all-numeric-types

Conversation

@sanelli

@sanelli sanelli commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds 11 per-type NumberStyles properties to MappaSettings (ByteStyle through DoubleStyle) for controlling string-to-numeric Parse overload selection, mirroring the DateTimeStyle pattern from Support DateTimeStyle for Parse and ParseExact for DateTime, DateOnly, TimeOnly #214.
  • Threads settings through the generator (attributes, .editorconfig, and global options) via ParseNumberStylesCodeHelper, selecting Parse(input), Parse(input, style), or Parse(input, style, culture) as appropriate.
  • Adds generator integration tests, samples with runtime/AOT coverage, and documentation updates. Bumps version to 10.1.0-alpha.7.

Test plan

  • .\Scripts\RunTestsAndReportCoverage.ps1 — 1870 tests passed
  • Generator integration tests cover method/class/editorconfig settings, overrides, combined flags, and culture combinations
  • Sample runtime tests verify (1,234) / (1,234.50) parsing with AllowThousands | AllowParentheses
  • AOT runners exercise new sample mappers

Made with Cursor

sanelli and others added 4 commits June 21, 2026 08:59
… 1).

Add UndefinedNumberStyle sentinel and eleven NumberStyles properties on MappaSettingsAttribute. Bump Mappa to 10.1.0-alpha.6 for downstream generator work.

Co-authored-by: Cursor <cursoragent@cursor.com>
…(steps 2-3).

Add ParseNumberStylesCodeHelper, per-type style settings in the generator stack, and NumberStyles-aware Parse overload emission for string-to-numeric mapping. Add 99 integration tests covering method/class/editorconfig, override hierarchy, regression, and combined culture.

Co-authored-by: Cursor <cursoragent@cursor.com>
…teps 4-7).

Bump Mappa to 10.1.0-alpha.7 after generator changes. Add method- and class-level NumberStyles samples with runtime and AOT coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
… (step 8).

Document per-type NumberStyles settings, editorconfig keys, and generator parse overload selection for string-to-numeric mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sanelli sanelli linked an issue Jun 21, 2026 that may be closed by this pull request
@sanelli sanelli merged commit 7d1dea0 into main Jun 21, 2026
1 check passed
@sanelli sanelli deleted the 215-support-numberstyles-for-parse-for-all-numeric-types branch June 21, 2026 08:35
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.

Support NumberStyles for Parse for all numeric types

1 participant