Commit Graph

20 Commits

Author SHA1 Message Date
Mark Gillard
cdf85a9b60 added toml::format_flags::relaxed_float_precision 2022-01-08 16:32:06 +02:00
Mark Gillard
dbc078202d removed internal operator""_sz (ADL is a cruel mistress)
also:
- applied clang-format to tests
- added some missing `TOML_API`
2021-10-26 16:49:23 +03:00
Mark Gillard
1ef6c0c6c8 update copyright year [skip ci] 2021-01-02 17:48:47 +02:00
Mark Gillard
f6450f6ff9 moved is_homogenous to toml::node
also:
- added is_homogenous overload for identifying failure-causing element (to assist with implementing #45)
- added table::is_homogenous
- added value::is_homogenous (just for generic code's sake)
2020-08-02 17:02:10 +03:00
Mark Gillard
ca6f639fb9 fixed narrowing conversion warnings when constructing int values from unsigned
also:
- added ability to construct values from wide strings and u8 strings
- added non-template version of array::is_homogeneous()
- added explicit instantiations for more template types when `!TOML_ALL_INLINE`
- cleaned up abi namespaces
- simplified build and test machinery on windows
- removed TOML_CHAR_8_STRINGS since it no longer makes sense
2020-07-20 00:40:55 +03:00
Mark Gillard
cb791fe0ef expanded allowable conversion semantics of value and value_or
also:
- fixed infinity and NaN-related code breaking when using -ffast-math and friends
- added much more detail to many static_assert error messages
- added more test permutations of various compiler flags
- added many more static checks to test code
2020-07-17 16:33:56 +03:00
Mark Gillard
40a1a03315 simplified test code to reduce bloat and improve compile times 2020-06-29 01:57:59 +03:00
Mark Gillard
b8438b3258 fixed ML strings not allowing whitespace after line-ending backslashes
also:
- fixed value comparison with special floats
- added all the remaining conformance tests from BurntSushi/toml-test and iarna/toml-spec-tests
- added toml::inserter
- added license boilerplate to test files
2020-06-27 15:55:15 +03:00
Mark Gillard
761690d4a6 fixed BOM check causing EOF on very short iostream inputs
also fixed a number of small parsing conformance issues
2020-06-25 17:33:01 +03:00
Mark Gillard
83315a3912 fixed multi-line strings being allowed in keys
also:
- significantly improved the performance of toml::parse_file
- improved the performance of printing to streams for deepy-nested TOML data
- simplified some of the examples
- added more tests
- cleaned up some of the test code
2020-06-08 18:31:23 +03:00
Mark Gillard
5e683e9a73 fixed is_unicode_XXXXXX functions being wrong in some cases
also:
- added tests for unicode functions
- changed `TOML_LIKELY` semantics to work with gcc-style intrinsics
- greatly improved unicode-related codegen
- parser refactoring
2020-04-18 23:42:33 +03:00
Mark Gillard
cd9b3d2198 fixed some multi-line string parsing issues
also:
- fixed pedantic warnings on gcc 10 and clang 11
2020-04-13 23:23:11 +03:00
Mark Gillard
682436aa2e fixed printing of inf and nan
also:
- fixed parser not handling floats with leading '.' characters
- added `TOML_PARSER` configuration option
- added `TOML_LIB_SINGLE_HEADER` indicator
- moved parse_error and the utf8 stream machinery to separate headers
- updated catch2
2020-04-09 16:49:16 +03:00
Mark Gillard
5ca6b29cb9 added support for implementations without <charconv> (fixes #21)
also:
- fixed some parsing and printing ops being locale-dependent (fixes #19)
- fixed pkgconfig subdir being wrong (fixes #23)
- fixed some parsing errors at EOF when `TOML_EXCEPTIONS = 0`
- fixed some unreferenced variable warnings on older compilers
- fixed some 'maybe-uninitialized' false-positives on GCC9
- added debug/release awareness to CI tests
- added locale awareness to catch test runner
2020-04-07 18:01:22 +03:00
Mark Gillard
cb000809b0 support for upcoming TOML v1.0.0 release
see https://github.com/toml-lang/toml/issues/698 for info about TOML v1.0.0

also:
- fixed some parser error-paths not returning early enough when exceptions were disabled
- added more specific error messages for parsing errors relating to prohibited codepoints
- added compilation speed improvements (particularly for platforms lacking floating-point `std::to_chars`)
- added many minor documentation improvements
- added additional tests
2020-04-03 00:39:21 +03:00
Mark Gillard
3d653de7c9 fixed potential ODR issues relating to exception mode handling (fixes #6)
also:
- fixed truncation of floating-point values when using ostreams
- fixed some minor documentation issues (fixes #8)
- fixed missing value deduction guides for dates and times
- added serialization round-trip tests (closes #9)
- added node::is_number()
- added node_view::is_number()
- added node_view::value_or() (closes #7)
- added hexfloat parsing support for all implementations, not just <charconv> ones
2020-02-22 16:10:32 +02:00
Mark Gillard
c7483cb92c added insertion operations for tables and arrays
also:
- fixed column numbers being wrong when a value ended at EOF
- fixed some `print_to_stream` overloads for `char8_t`
- fixed a minor preprocessor snafu on MSVC
- fixed '\' not being escaped when printing string values
- added an initializer list constructor for tables
- added `array::flatten`
- added `table::find`
- added `table::is_inline` setter
- added `TOML_SMALL_INT_TYPE`
- added `parse_file`
- added stream operator for source_region
- added proper license notice for the utf8 decoder
- added lots more documentation and tests
2020-02-13 20:34:45 +02:00
Mark Gillard
537eb30080 added iterators for tables and arrays
also:
- fixed parsing table headers allowing invalid characters
- fixed implicit fallthrough warnings
- fixed some issues parsing dates and times
- added `table::erase`
- added `array::operator[]`
- added `value::operator*`
- added stream operators for date, time and date_time
- added `impl::print_to_stream`
- added more parsing diagnostics
- added many tests
2020-01-10 19:33:58 +02:00
Mark Gillard
40ffee43fb added json_formatter
also:
- added `toml_version.h`
- added version number to toml.hpp
- added `node::visit()`
- added `table::empty()`
- added `array::empty()`
- added version number to `toml.hpp`
- added ostream operator overload for `source_position`
- added tests for string escape sequences
- added tests for + in bare keys (toml/issues/687)
- added tests for hexfloat literals (toml/issues/562)
- added c++20 char8_t detection to meson
- moved third party submodules to `/extern`
- refactored noexcept version of `parse_result` to be more useful
- refactored all code to 'mostly' stick to a 120 column limit
- fixed some minor stuff picked up by gcc9
2020-01-06 22:24:53 +02:00
Mark Gillard
930bf0ad58 new file: .circleci/config.yml
new file:   .editorconfig
new file:   .gitattributes
new file:   .gitignore
new file:   .gitmodules
new file:   LICENSE
new file:   README.md
new file:   examples/example.cpp
new file:   examples/example.toml
new file:   examples/meson.build
new file:   include/toml++/toml.h
new file:   include/toml++/toml_array.h
new file:   include/toml++/toml_common.h
new file:   include/toml++/toml_formatter.h
new file:   include/toml++/toml_node.h
new file:   include/toml++/toml_node_view.h
new file:   include/toml++/toml_parser.h
new file:   include/toml++/toml_table.h
new file:   include/toml++/toml_utf8.h
new file:   include/toml++/toml_utf8_generated.h
new file:   include/toml++/toml_value.h
new file:   meson.build
new file:   python/ci_single_header_check.py
new file:   python/generate_single_header.py
new file:   python/generate_unicode_functions.py
new file:   tests/catch2
new file:   tests/catch2.h
new file:   tests/lifetimes.cpp
new file:   tests/main.cpp
new file:   tests/meson.build
new file:   tests/parsing_arrays.cpp
new file:   tests/parsing_booleans.cpp
new file:   tests/parsing_comments.cpp
new file:   tests/parsing_dates_and_times.cpp
new file:   tests/parsing_floats.cpp
new file:   tests/parsing_integers.cpp
new file:   tests/parsing_key_value_pairs.cpp
new file:   tests/parsing_spec_example.cpp
new file:   tests/parsing_strings.cpp
new file:   tests/parsing_tables.cpp
new file:   tests/tests.cpp
new file:   tests/tests.h
new file:   toml.hpp
new file:   vs/.runsettings
new file:   vs/example.vcxproj
new file:   vs/test_char.vcxproj
new file:   vs/test_char8.vcxproj
new file:   vs/test_char8_noexcept.vcxproj
new file:   vs/test_char_noexcept.vcxproj
new file:   vs/test_strict_char.vcxproj
new file:   vs/test_strict_char8.vcxproj
new file:   vs/test_strict_char8_noexcept.vcxproj
new file:   vs/test_strict_char_noexcept.vcxproj
new file:   vs/toml++.natvis
new file:   vs/toml++.props
new file:   vs/toml++.sln
new file:   vs/toml++.vcxproj
new file:   vs/toml++.vcxproj.filters
2020-01-04 16:21:38 +02:00