Commit Graph

230 Commits

Author SHA1 Message Date
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
ToruNiina
84676eab0b improve quality of error message 2018-12-09 13:05:09 +09:00
ToruNiina
2b3a4d49a5 add region_base to contain it in toml::value
to make toml::get and toml::value::cast return better error messages
2018-12-09 12:41:38 +09:00
ToruNiina
f834e0d142 cosmetic: sort value_t in types.h 2018-12-09 11:06:19 +09:00
ToruNiina
a1aa780a60 Merge branch 'toml-v050' of github.com 2018-12-09 11:05:26 +09:00
ToruNiina
48f3b73b91 add ctor(local_datetime, time_offset) to offset_datetime 2018-12-09 00:11:07 +09:00
ToruNiina
04854f9d21 stop having begin/end iterator in region/location 2018-12-09 00:00:15 +09:00
ToruNiina
8388664fc6 add map_err_or_else to result 2018-12-08 22:44:15 +09:00
ToruNiina
bb215836dc add missing header files 2018-12-08 20:39:37 +09:00
ToruNiina
2b2a05148e add from_string to utility 2018-12-08 20:21:15 +09:00
ToruNiina
66807d19d1 add specializations 2018-12-08 19:40:58 +09:00
ToruNiina
861444a02b disable some of the tests once 2018-12-08 19:23:53 +09:00
ToruNiina
25789d1450 set Datetime as offset_datetime
prepare for TOML v0.5.0
2018-12-08 19:23:09 +09:00
ToruNiina
1e28cb2d13 add test for concat_string 2018-12-08 19:22:41 +09:00
ToruNiina
ae564bd814 change include file of test_traits 2018-12-08 19:22:31 +09:00
ToruNiina
366f72bbdd Merge branch 'datetime' into combinator 2018-12-08 19:06:19 +09:00
ToruNiina
3ef33c1637 change almost everything about datetime 2018-12-08 19:04:41 +09:00
ToruNiina
e05d0bdb84 stop using distance(next(iter), last)
under some condition, it causes serious error.
2018-12-06 20:13:06 +09:00
ToruNiina
5dbbc1fb1a add escaped newline to lexer for multiline string
to use it in parse_ml_basic_string
2018-12-06 19:53:49 +09:00
ToruNiina
b3b5682cc0 add message to bad_unwrap 2018-12-06 17:15:19 +09:00
ToruNiina
df314da751 change error message considering context
combinators are used with other parser-combinators. in such cases, empty
input means `not enough character`.
2018-12-06 17:03:57 +09:00
ToruNiina
3d1783e12a Merge 'types' into combinator 2018-12-06 16:06:25 +09:00
ToruNiina
f8aa604959 Merge branch 'result' into combinator
- fix some of the constructors of result
- add some utility member functions to boost
2018-12-06 12:57:58 +09:00
ToruNiina
e3f6805629 add conversion members to result 2018-12-06 12:47:14 +09:00
ToruNiina
1dddc6e26c add missing std::move for ctors 2018-12-06 12:46:32 +09:00
ToruNiina
5e052237ba add alias for snake_case types 2018-12-06 01:20:11 +09:00
ToruNiina
a995bd515b Merge branch 'master' into combinator
split typedefs from value.hpp
2018-12-05 21:42:14 +09:00
ToruNiina
00619c1c85 Merge branch 'types'; split typedefs from value 2018-12-05 21:41:22 +09:00
ToruNiina
532457345c split type definitions from value.hpp 2018-12-05 20:55:25 +09:00
ToruNiina
f9a018b5ea add source_name to test_lex_aux macros 2018-12-05 17:19:37 +09:00
ToruNiina
aa05858de3 add source_name to location/region to show filename
now error message prints the filename
2018-12-05 16:55:31 +09:00
ToruNiina
2b3c8887d6 add comment to confusing implementation 2018-12-04 22:17:20 +09:00
ToruNiina
932a0646ce force clamping character code in [0,256) 2018-12-04 21:58:47 +09:00
ToruNiina
c3a2cd8c1e use hexcode instead of u8 string on windows 2018-12-04 21:43:43 +09:00