Skip to content

Conversation

@filzrev
Copy link
Contributor

@filzrev filzrev commented Nov 10, 2024

This PR intended to fix following issues.

1. Change number checks to more strict regex
It's discussed at #990 (comment)
When parsing scalar values. whitespaces are already ignored by scanner.
So there is no needs using partial regex match.

2. Change Hex string format parse logics not to throw exceptions
Same as integer/float string format. (That is fixed at #990)

[InlineData(System.Int32.MinValue)]
[InlineData(System.Int32.MaxValue)]
[InlineData(System.Int64.MinValue)]
[InlineData(System.Int64.MaxValue)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UnitTest for ulong is not included.
Because ulong code path is not seems not be used.
Hex/Octal number representation is same for long/ulong and these number is always parsed as long

@EdwardCooke EdwardCooke merged commit 63721ee into aaubry:master Dec 23, 2024
@filzrev filzrev deleted the perf-optimize-parse-numbers2 branch December 23, 2024 18:29
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.

2 participants