fktn-k / fkYAML

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

Allow trailing comma in flow mapping/sequence #365

Closed fktn-k closed 3 months ago

fktn-k commented 3 months ago

The current parser didn't allow trailing commas in flow mappings/sequences like the following valid YAML snippet:

foo: {
  null: 123,
  baz: true,
}
bar: [
  3.14,
  false,
]

The YAML spec allows both putting/omitting trailing commas in flow mappings/sequences.
So, this PR has modified the implementation to allow putting trailing commas by modifying state management for flow contexts.


Pull Request Checklist

Read the CONTRIBUTING.md file for detailed information.

Please don't

github-actions[bot] commented 3 months ago

:octocat: Upload Coverage Event Notification

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

Name fkYAML_coverage.pr365.zip
ID 1605953302
URL https://github.com/fktn-k/fkYAML/actions/runs/9535291146/artifacts/1605953302
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9534915247

Details


Totals Coverage Status
Change from base Build 9532939917: 0.0%
Covered Lines: 3932
Relevant Lines: 3932

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9535200345

Details


Totals Coverage Status
Change from base Build 9532939917: 0.0%
Covered Lines: 3944
Relevant Lines: 3944

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9535291146

Details


Totals Coverage Status
Change from base Build 9532939917: 0.0%
Covered Lines: 3944
Relevant Lines: 3944

💛 - Coveralls