Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[break] use null strings when parsing YAML-null values
Merge pull request #85 from biojppm/issue84 Breaking change: null values in YAML are now parsed to null strings instead of YAML null token "~": auto tree = parse("{foo: , bar: ''}"); // previous: assert(tree["foo"].val() == "~"); assert(tree["bar"].val() == ""); // now: assert(tree["foo"].val() == nullptr); // notice that this is now null assert(tree["bar"].val() == ""); Fixes #84.
- Loading branch information
Showing
14 changed files
with
254 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
# Changelog | ||
|
||
## Changes in master | ||
Currently there are no ryml releases. However, the master branch is always | ||
stable; it is validated by requiring all tests to succeed before merging to it. | ||
So for now, only major changes to master are listed. | ||
|
||
* 2020/September | ||
* [***Breaking change***] [MR#85](https://github.com/biojppm/rapidyaml/pull/85) | ||
null values in YAML are now parsed to null | ||
strings instead of YAML null token "~": | ||
```c++ | ||
auto tree = parse("{foo: , bar: ''}"); | ||
// previous: | ||
assert(tree["foo"].val() == "~"); | ||
assert(tree["bar"].val() == ""); | ||
// now: | ||
assert(tree["foo"].val() == nullptr); // notice that this is now null | ||
assert(tree["bar"].val() == ""); | ||
``` | ||
* [MR#85](https://github.com/biojppm/rapidyaml/pull/85) Commas after tags are now allowed: | ||
```yaml | ||
{foo: !!str, bar: ''} # now the comma does not cause an error | ||
``` | ||
* [MR#81](https://github.com/biojppm/rapidyaml/pull/81): Always compile | ||
with extra pedantic warnings. | ||
|
||
* 2020/May | ||
* ***Breaking change***: the error callback now receives a source location object: | ||
* [***Breaking change***] the error callback now receives a source location object: | ||
```c++ | ||
// previous | ||
using pfn_error = void (*)(const char* msg, size_t msg_len, void *user_data); | ||
// now: | ||
using pfn_error = void (*)(const char* msg, size_t msg_len, Location location, void *user_data); | ||
``` | ||
* Parser fixes to improve test suite success: | ||
[MR#73](https://github.com/biojppm/rapidyaml/pull/73), | ||
[MR#71](https://github.com/biojppm/rapidyaml/pull/71), | ||
[MR#68](https://github.com/biojppm/rapidyaml/pull/68), | ||
[MR#67](https://github.com/biojppm/rapidyaml/pull/67), | ||
[MR#66](https://github.com/biojppm/rapidyaml/pull/66) | ||
* Fix compilation as DLL on windows [MR#69](https://github.com/biojppm/rapidyaml/pull/69) |
Submodule c4core
updated
25 files
+5 −0 | src/c4/substr.hpp | |
+21 −21 | test/CMakeLists.txt | |
+0 −0 | test/test_allocator.cpp | |
+0 −0 | test/test_base64.cpp | |
+1 −1 | test/test_bitmask.cpp | |
+0 −0 | test/test_blob.cpp | |
+0 −0 | test/test_char_traits.cpp | |
+0 −0 | test/test_charconv.cpp | |
+0 −0 | test/test_ctor_dtor.cpp | |
+1 −1 | test/test_enum.cpp | |
+0 −0 | test/test_enum_common.hpp | |
+0 −0 | test/test_error.cpp | |
+0 −0 | test/test_error_exception.cpp | |
+0 −0 | test/test_format.cpp | |
+0 −0 | test/test_log.cpp | |
+0 −0 | test/test_memory_resource.cpp | |
+0 −0 | test/test_memory_util.cpp | |
+0 −0 | test/test_preprocessor.cpp | |
+0 −0 | test/test_span.cpp | |
+0 −0 | test/test_std_string.cpp | |
+0 −0 | test/test_std_vector.cpp | |
+39 −0 | test/test_substr.cpp | |
+0 −0 | test/test_szconv.cpp | |
+0 −0 | test/test_type_name.cpp | |
+0 −0 | test/test_types.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.