Commit Graph

111 Commits

Author SHA1 Message Date
Mark Gillard
fd07301bae improved support for __fp16, _Float16 and __float128
also:
- fixed a bunch of doxygen parsing issues
- added `#define` leak detection to the single-header script
- renamed `TOML_ALL_INLINE` to `TOML_HEADER_ONLY` (the old one still works too)
- simplified abi namespace definitions
2020-07-25 20:50:24 +03:00
Mark Gillard
cb113ae65e fixed Wcast-align warning spam on ARM 2020-07-22 21:47:27 +01:00
Mark Gillard
9afa43e7c2 fixed leading/trailing newlines with printing to ostreams (fixes #48)
also:
- change internal nan constant to match qNaN bits on x86/ARM
2020-07-21 16:11:32 +03:00
Mark Gillard
7314fbf8c2 deprecated parse_result::get() in favour of parse_result::table()
also:
- fixed static assert messages being badly formatted on clang
- minor documentation fixes
- updated version numbers
2020-07-20 17:26:36 +03:00
Mark Gillard
d84bd8bc78 renamed date_time::time_offset to just 'offset'
also:
- fixed natvis for date, time, time_offset, date_time
2020-07-20 02:09:03 +03:00
Mark Gillard
1ecd0bd844 Merge branch 'master' into new-value-getters 2020-07-20 00:47:49 +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
Nathan Reed
a9a748e5dc
Add more VS debug visualizers (#46)
- Added natvis entries for toml::table, toml::array, parse_result, and parse_error
2020-07-19 22:37:23 +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
de07ba7187 string value serialization now emits literals where possible (closes #43)
also added support for wide strings on Windows (closes #42):
- added wide-string path arg overloads of `parse()` and `parse_file()`
- added wide-string support to all relevant `table` and `array` ops
- added `std::wstring` support to `node::value()` and `node::value_or()`
- added `std::wstring` support to `node_view::value()` and `node_view::value_or()`
- added wide-string overloads of `table::operator[]`
- added wide-string overloads of `node_view::operator[]`
- added `source_region::wide_path()`
- added `TOML_WINDOWS_COMPAT` switch for explicitly enabling/disabling this stuff

also:
- fixed internal macro `assert_or_assume` leaking out of `toml_parser.hpp`
- deprecated `node_view::get()` in favour of `node_view::node()`
- minor documentation fixes
- minor cleanup
2020-07-14 20:50:24 +03:00
Mark Gillard
8d958fcc54 documentation improvements and minor cleanup
- split conformance tests into multiple TU's
- added "Try this code on Compiler Explorer" links to the main page
- minor preprocessor cleanup
2020-07-06 01:03:07 +03:00
Mark Gillard
51f64fd08d documentation improvements
- moved the main page to a separate dox file
- added integration section to homepage
- improved some of the examples
- formatting fixes
- added note about python wrapper (closes #36)
2020-07-02 20:17:23 +03:00
Mark Gillard
f52949a481 refactoring parser to reduce binary sizes
Basically boils down to eliminating excessive template instantiations.
2020-06-29 17:49:48 +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
25c020bb43 fixed streamsize conversion warning on ARM 2020-06-28 15:46:04 +01:00
Mark Gillard
0b334fd7d2 added rvalue overload of array::flatten
also:
- made array::flatten return a reference to the array
- minor documentation fixes
2020-06-28 15:26:18 +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
7bf908fc11 updating submodules 2020-06-25 17:44:43 +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
a122b3b9b4 more preprocessor cleanup
- fixing 'unknown pragma' warnings in GCC
- cleaning up test structure
2020-06-24 21:05:23 +03:00
Mark Gillard
464d3d13cc documentation improvements
- updated TOML links to new toml.io website
- refactored the main page
2020-06-24 14:28:20 +03:00
Mark Gillard
00a8d14a49 minor preprocessor/doxygen cleanup 2020-06-23 13:04:05 +03:00
Mark Gillard
0d8f794feb Update README [skip ci] 2020-06-23 01:32:25 +03:00
Mark Gillard
97bf64b9fd CI: update node docker image 2020-06-23 01:24:18 +03:00
Mark Gillard
965a707fe2 deleted some duplicated preprocessor handling
also:
- updated test and dox submodules
- updated README
2020-06-23 00:35:02 +03:00
Mark Gillard
7fb4dbbb6d fixed std::numeric_limits::max() getting broken by macros in some environments 2020-06-21 00:02:59 +03:00
Mark Gillard
ab85988d59 fixed single-digit negative integer parsing bug (closes #39)
also:
- fixed overflow for very long binary integer literals
- added optimization for parsing string views containing trailing null characters
- added more tests
2020-06-19 14:17:52 +03:00
Mark Gillard
041d7a7a44
Readme updates [skip ci] 2020-06-08 21:47:31 +03:00
Chris Mc
13a02140c7
Adding details for using Conan package manager (#38) [skip ci] 2020-06-08 18:32:25 +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
da024510c5 fixed parse failure when parsing an empty file
Blank files are in fact totally valid TOML and should not cause a parse failure (fixes #35).
2020-06-07 16:28:08 +03:00
Mark Gillard
3792093d09 v1.3.0 2020-06-02 18:49:16 +03:00
Mark Gillard
2c83d1b482 updating toml.hpp 2020-05-24 13:50:52 +03:00
Mark Gillard
d8fdf4e1e5 fixed weird overflow with BOMs in char8 mode 2020-05-24 13:42:15 +03:00
Mark Gillard
289c95cb51 renamed table proxy pair members to first and second to match STL (closes #30)
also:
- implemented `table_iterator::operator -> ()` (closes #29)
- added `array::resize()` and `array::truncate()` (closes #33)
- refactored BOM handling to make static analyzer happy (closes #34)
- added `array::capacity()`, `array::shrink_to_fit()`, `array::max_size()`
- implemented non-const -> const conversion for table and array iterators
2020-05-23 17:35:47 +03:00
Mark Gillard
983e22978e fixed formatter::print_inline causing compilation failures in windows DLL builds 2020-05-20 13:27:06 +03:00
Mark Gillard
9083b58fd5 updated submodules
also fixed inline warning spam in gcc10
2020-05-13 15:56:56 +03:00
Chris Mc
992e7034c5
fixing typo (#26) 2020-04-23 18:15:13 +03:00
Mark Gillard
aa37852f53 minor code cleanup 2020-04-21 16:40:03 +03:00
Mark Gillard
61106ab9f3 minor improvements to codegen of unicode functions 2020-04-19 23:08:51 +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
0c2279d15a minor improvements to the wording of some error messages
also:
- added 'error_printer' example
2020-04-14 12:45:32 +03:00
Mark Gillard
0fbdc945bb fix examples breaking CI =/ 2020-04-14 08:45:24 +03:00
Mark Gillard
61304ac519 added toml_generator example 2020-04-14 08:25:03 +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
42af364887 refactored parser
Mainly to simplify a the error handling code (it had gotten a bit verbose), but also to reduce compiled binary sizes.

also:
- moved windows terminal code page stuff in examples to a separate file
2020-04-11 19:43:38 +03:00
Mark Gillard
f3990256ce moved preprocessor machinery to a separate header
- added doxygen page for the configuration options
- added SPDX-License-Identifiers around the place
- changed TOML_UNRELEASED_FEATURES default to 0
- simplified ABI namespace machinery
- fixed a number of doxygen bugs
2020-04-10 19:46:00 +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
104b2741d1 minor refactoring in the parser to reduce binary sizes
also:
- fixed pedantic vtable warnings on clang with -Weverything
- renamed `_impl.h` headers to `.hpp`
- build system and CI config tweaks
2020-04-08 16:33:57 +03:00
Mark Gillard
45c0fe26c0 added build option GENERATE_CMAKE_CONFIG [skip ci]
also:
- minor cleanup
2020-04-07 22:34:54 +03:00