Commit Graph

263 Commits

Author SHA1 Message Date
ToruNiina
b015e1ac5b update README for the next version 2018-12-12 19:33:01 +09:00
ToruNiina
717e03cd4a add find-get overload functions 2018-12-12 17:55:34 +09:00
ToruNiina
5a20d55dd0 add test for toml::get 2018-12-12 17:23:06 +09:00
ToruNiina
dc060ba840 add explicit std::move to toml::get(&&) 2018-12-12 17:22:41 +09:00
ToruNiina
fcbfbd3a26 supress warning about comparison between signed and unsigned 2018-12-12 16:12:10 +09:00
ToruNiina
0c9b785969 add missing include file 2018-12-12 16:11:37 +09:00
ToruNiina
bcaf5baf88 fix parse_array_of_table_key
allow whitespace before and after [[ and ]] (like, [[ a.b ]])
2018-12-12 12:14:11 +09:00
ToruNiina
5dea88001e add test case for array-of-tables 2018-12-12 12:13:49 +09:00
ToruNiina
b63dc1f370 remove extra comma 2018-12-12 01:36:20 +09:00
ToruNiina
d3e88b3082 add test case for table key 2018-12-12 01:31:36 +09:00
ToruNiina
a1a81089c5 skip whitespace before/inside/after dotted-keys 2018-12-12 01:30:47 +09:00
ToruNiina
765ab97d8b add whitespace between [] and key
[ a.b.c ] is allowed. also, [[ a . b ]] is allowed.
dotted key matches `a.b.c` only, so the explicit whitespace is needed.
2018-12-12 01:27:10 +09:00
ToruNiina
9f8e86524a add a lot of dotted keys to test_lex 2018-12-12 01:26:56 +09:00
ToruNiina
4d64c0d8af add tests for inline table 2018-12-11 23:38:57 +09:00
ToruNiina
e810c3d35e add tests for equivalent operator 2018-12-11 23:33:32 +09:00
ToruNiina
fc3471434f add test for array 2018-12-11 23:31:24 +09:00
ToruNiina
be8600abfa add test for key and string 2018-12-11 23:25:44 +09:00
ToruNiina
e79e6150f2 update testing macro 2018-12-11 23:25:23 +09:00
ToruNiina
fc6a15440d enable format_underline to print hint with region 2018-12-11 22:22:07 +09:00
ToruNiina
d7bba10fa3 improve error message in parse_key_value_pair 2018-12-11 22:21:22 +09:00
ToruNiina
247bcb0714 show error message for inhomogenous array 2018-12-11 22:17:28 +09:00
ToruNiina
3055645323 remove old tests 2018-12-11 21:52:53 +09:00
ToruNiina
0253f49101 add a test for parser (WIP) 2018-12-11 21:51:39 +09:00
ToruNiina
27b9334f10 skip BOM if exists 2018-12-11 21:40:48 +09:00
ToruNiina
38135940e9 add expect<T>(toml::value) 2018-12-11 11:36:40 +09:00
ToruNiina
d75a977066 improve error message for bad unwrap a bit 2018-12-11 11:35:07 +09:00
ToruNiina
75c136924b add datetimes to chrono 2018-12-10 22:06:06 +09:00
ToruNiina
0759e757ae move is_chrono_duration from types to traits 2018-12-10 22:05:42 +09:00
ToruNiina
4e57c5f5df improve error message for invalid line
like a = 12 = true, newline is expected after 12
2018-12-10 21:43:02 +09:00
ToruNiina
ff83a6a477 remove redundant part of error messages 2018-12-10 21:42:56 +09:00
ToruNiina
3f991c4759 improve power of get 2018-12-10 15:58:20 +09:00
ToruNiina
bf2158ae98 add map from exact toml type -> toml::value_t 2018-12-10 15:57:44 +09:00
ToruNiina
ff19c9f492 add corresponding region to each value 2018-12-10 15:57:17 +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
8078c719fe remove old code 2018-12-10 00:15:41 +09:00
ToruNiina
8e18aa9b16 add toml::parse 2018-12-10 00:14:46 +09:00
ToruNiina
ed155a5040 remove help msgs in parse_value
because the error message becomes too long
2018-12-09 21:54:47 +09:00
ToruNiina
cf03a08632 re-write parser using result and new value
wip.
2018-12-09 19:32:30 +09:00
ToruNiina
34c3d33936 use vector instead of initializer_list 2018-12-09 19:30:46 +09:00
ToruNiina
c04b75b2e3 consider LF in the range when writing error msg 2018-12-09 18:08:04 +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
dc8ccdc458 construct much more tmp variables
std::chrono::seconds -= std::chrono::milliseconds cannot be done bc
it represents the duration as integer value and milliseconds are less
than seconds. it causes compilation error when we pass a duration to
toml::local_time. to avoid this, we need to type-cast the values to
smaller duration, like sec -> msec
2018-12-09 18:00:46 +09:00
ToruNiina
2696e4e6ba split storage from value
also, quit inheritance in storage class
2018-12-09 16:41:45 +09:00
ToruNiina
d1d5ca6bf8 add toml::string to have basic/literal flag 2018-12-09 16:40:57 +09:00
ToruNiina
80eafd1424 add datetime variants and rearrange type-related functions 2018-12-09 16:34:47 +09:00
ToruNiina
9fadf71a10 add constructor from duration to local_time 2018-12-09 16:27:47 +09:00
ToruNiina
ac3025d92f change default return value of region_base 2018-12-09 13:39:13 +09:00
ToruNiina
b0e7efa1e0 make some constructors explicit 2018-12-09 13:38:57 +09:00