Commit Graph

26 Commits

Author SHA1 Message Date
ToruNiina
0babe8d589 fix: use format_underline for N regions everywhere 2019-03-14 00:59:10 +09:00
ToruNiina
d88521d63c feat: enable to change region of value
To allow the following toml file, we need to replace the region after
the more precise region is found.
```toml
[a.b.c]
d = 42
[a]
e = 2.71
```
If the precise region (here, [a]) is found, the region of `a` should be
`[a]`, not `[a.b.c]`. After `[a]` is defined, toml does not allow to
write `[a]` twice. To check it, we need to replace the region of values
to the precise one.
2019-03-04 15:01:28 +09:00
ToruNiina
b36fdf2f54 refactor: remove internal fn not needed any more
The function was needed to copy region information from value to value,
for a useful error message. Because of the last few commits, the region
information about keys are passed to insert_nested_keys that requires
the function which is removed. And it turned out that the function is no
longer required. It is originally a workaround, so I removed it.
2019-02-27 01:07:00 +09:00
ToruNiina
41e354f1ee supress warnings while skipping switch-cases 2019-02-13 13:50:33 +09:00
ToruNiina
64774a8db0 add toml::visit to use it in serializer 2019-02-13 13:36:55 +09:00
ToruNiina
53f6b8268b fix: compare offset_datetime correctly 2019-02-13 13:34:26 +09:00
ToruNiina
aa67069387 move hints to the internal function 2018-12-27 16:32:20 +09:00
ToruNiina
ee3424ad51 add an extra parameter hints to format_error 2018-12-27 16:26:23 +09:00
ToruNiina
ab41e7acb9 enable to pass 2 value and change interface for clarity 2018-12-16 21:50:18 +09:00
ToruNiina
c15bc8df4a add format_error(toml::value, msg, comment) 2018-12-16 21:46:32 +09:00
ToruNiina
fd21d5dd95 add simplest copyright notice 2018-12-13 20:44:10 +09:00
ToruNiina
f60e93c36f enable to assign value keeping region info 2018-12-13 17:07:26 +09:00
ToruNiina
acc7b7870f remove format_error_for_value and add get_region instead
it is convenient to have get_region function that can access region_info
in toml::value. get_region is placed in toml::detail and made friend of
toml::value because I don't want to make toml::value::region_info public
and keep it internal use only.
2018-12-13 16:13:05 +09:00
ToruNiina
28ba2713ee fix initialization of region in value 2018-12-10 15:25:27 +09:00
ToruNiina
129ea81f66 remove redundant words in error message 2018-12-10 15:23:46 +09:00
ToruNiina
8dfe187d59 add a function to show a better error message 2018-12-10 15:06:28 +09:00
ToruNiina
e24039f4ef update toml::value and improve test_value
- enable to store new types
- store source string if possible
- refactoring
2018-12-09 18:03:20 +09:00
ToruNiina
2696e4e6ba split storage from value
also, quit inheritance in storage class
2018-12-09 16:41:45 +09:00
ToruNiina
532457345c split type definitions from value.hpp 2018-12-05 20:55:25 +09:00
ToruNiina
f326334147 add definition of constexpr static value to avoid linker error 2018-07-08 18:58:38 +09:00
ToruNiina
170b0d6b3f use constexpr value instead of call constexpr func directory 2018-05-05 12:06:06 +09:00
ToruNiina
117549bf70 change is_(map|container) and remove needless trait 2018-05-05 11:36:47 +09:00
Guillaume Fraux
57cc7f77c1 Allow to build with intel c++ compiler 2017-06-13 16:05:55 +02:00
ToruNiina
9e9a5a7253 fix typo 2017-05-17 10:55:22 +09:00
ToruNiina
6878abdca1 define charactor type 2017-05-08 19:17:14 +09:00
ToruNiina
78f25dd66d split files 2017-04-21 13:14:53 +09:00