fktn-k / fkYAML

A C++ header-only YAML library
MIT License
67 stars 7 forks source link

Fix error on parsing a floating point value which ends with a dot #382

Closed fktn-k closed 1 month ago

fktn-k commented 1 month ago

As reported in the issue #380, the current parser emits an error on parsing a floating point value which ends with a dot.
That is because, while scanning a parsed scalar, the parser mistakenly assumes decimals after a dot.
However, the spec explicitly allows omitting decimals after a dot here as the regular expression for the float tag.

So, this PR has fixed implementation to follow the spec, and the updated parser now correctly parse such floating point values.
To validate the changes, some relevant test cases have also been added to the test suite.


Pull Request Checklist

Read the CONTRIBUTING.md file for detailed information.

Please don't

github-actions[bot] commented 1 month ago

:octocat: Upload Coverage Event Notification

Coverage data has been uploaded for the commit 5d22947b09225b249fee54df93fb613a7ff2a4bb. You can download the artifact which contains the same file uploaded to the Coveralls and its HTML version.

Name fkYAML_coverage.pr382.zip
ID 1838272844
URL https://github.com/fktn-k/fkYAML/actions/runs/10493403511/artifacts/1838272844
coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 10493403511

Details


Totals Coverage Status
Change from base Build 10473001599: 0.0%
Covered Lines: 3975
Relevant Lines: 3975

💛 - Coveralls