Commit Graph

166 Commits

Author SHA1 Message Date
Mark Gillard
a1527d5529 fix godbolt links in documentation 2020-07-28 01:51:14 +03:00
Mark Gillard
2efb15bf9e added insert, emplace, push_back etc. compatibility with node_views
In service of satisfying #49.
2020-07-28 01:21:41 +03:00
Mark Gillard
17d1876529 added copy construction/assignment for arrays. tables and values
In service of satisfying #49.
2020-07-27 13:38:01 +03:00
Mark Gillard
539aad89f4 fixed array::insert not working correctly in some cases
also:
- improved the documentation for table and array
- fixed documentation font on mobile
2020-07-26 15:03:33 +03:00
Mark Gillard
35ada5d851 fix include guard regression in toml.hpp generator 2020-07-26 00:42:36 +03:00
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