ToruNiina
6d31cccc5b
feat: throw if multiple keys match to the key
2019-09-01 14:45:56 +09:00
ToruNiina
3e6747cfeb
feat: add find_fuzzy and suggeston
...
Add the following
- find_fuzzy<T>(val, "key")
- find<T>(val, "key", FuzzyMatcher) to suggest typo
- levenstein_matcher
2019-08-31 19:28:50 +09:00
ToruNiina
4cebd660fd
refactor: use as_xxx to cast toml value
...
and store rvalue reference as a value instead of lvalue
2019-08-31 18:22:36 +09:00
ToruNiina
43907de365
refactor: check key types in find(v, k1, k2, ...)
...
ks should be convertible to toml::key
2019-08-31 17:28:07 +09:00
ToruNiina
9b43171b65
refactor: split get.hpp to get/find.hpp
2019-08-31 14:49:00 +09:00
ToruNiina
15b68a89c6
fix: suppress warnings by forwarding argument
2019-08-31 13:04:25 +09:00
ToruNiina
7a1b5bd64e
fix: skip whitespaces without newline
2019-08-26 18:16:09 +09:00
ToruNiina
e332e018db
feat: allow raw tab characters in basic strings
...
This feature is planned to be incorporated in toml v1.0.0 but not
released yet.
2019-08-21 11:19:47 +09:00
ToruNiina
8dded288b4
Merge branch 'master' into find-or-value
2019-08-07 14:58:56 +09:00
ToruNiina
0f491c7f3a
fix: add overload for find_or with toml::value
2019-08-07 14:55:30 +09:00
ToruNiina
cffc605505
fix: stop including iostream
2019-07-23 22:27:20 +09:00
ToruNiina
87e0ba201e
feat: enable to swap comment and strings
2019-07-13 14:33:14 +09:00
ToruNiina
c2435b0d56
feat 💥 : format toml::string as TOML format
2019-06-29 20:19:47 +09:00
ToruNiina
c272188060
fix: check inline table does not include LF
2019-06-29 16:39:54 +09:00
ToruNiina
d5299fef04
feat: add no_comment option to serializer
2019-06-29 14:59:18 +09:00
ToruNiina
0502924d25
feat: add nocomment and showcomment
2019-06-28 19:08:48 +09:00
ToruNiina
3624e4b690
fix: put comment just after non-table values
...
When non-table value is passed to the `operator<<`, it assumes that the
original C++ code looks like the following.
```cpp
std::cout << "key = " << v << std::endl;
```
In this case, the comment associated to `v` should be put just after
`v`, not before.
```toml
key = # comment <= bad
"value"
key = "value" # comment <= good
```
So, if `v` is not a table it would put comments just after the value.
2019-06-28 17:53:19 +09:00
ToruNiina
79e7511871
feat: add format_key to help serialization
2019-06-28 17:47:19 +09:00
ToruNiina
284f122433
refactor: replace for-loop by comment output
2019-06-28 14:58:47 +09:00
ToruNiina
28b3f7d6fb
feat: add ostream operator to comment containers
2019-06-28 14:57:45 +09:00
ToruNiina
6b5fd349aa
fix: initialize source_location correctly
2019-06-26 21:35:01 +09:00
ToruNiina
76e44a0c48
refactor: remove needless inline specifier
2019-06-26 21:34:36 +09:00
ToruNiina
6a251f582e
refactor: remove needless code snippet
2019-06-22 17:52:01 +09:00
ToruNiina
74ef494797
feat: remove unused trait types
2019-06-22 17:35:40 +09:00
ToruNiina
0cee58b0b1
Merge branch 'v3' of github.com:ToruNiina/toml11 into v3
2019-06-21 14:31:52 +09:00
ToruNiina
d4afed5bbb
feat: construct value with a list of comments
2019-06-21 14:26:05 +09:00
ToruNiina
a68543a895
fix: detect comment in stricter way
2019-06-21 13:10:02 +09:00
ToruNiina
ecf55f86d6
refactor: add explicit type conversion
2019-06-21 00:25:57 +09:00
ToruNiina
be2d2aec52
refactor: explicitly convert difference_t to size_t
2019-06-20 23:59:16 +09:00
ToruNiina
be04bf1302
refactor: convert file size to size_t
2019-06-20 23:58:35 +09:00
ToruNiina
427706d671
fix: explicitly add float conversion
2019-06-20 23:58:15 +09:00
ToruNiina
71ff54e76c
fix: rearrange internal int types in datetimes
2019-06-20 23:58:08 +09:00
ToruNiina
8208bbf236
fix: check and convert value manually
...
I totally have no idea when std::count returns a negative value, but the
result type of `std::count` is a differnce_type. So when it is added
with size_t value, implicit sign conversion happens. This changes check
this kind of (almost trivial but required) checking.
2019-06-20 22:27:16 +09:00
ToruNiina
f689d26294
refactor: add conversion function to utf8 encoder
2019-06-20 22:25:40 +09:00
ToruNiina
9e6d8e76d0
fix: replace null deref by terminate for safety
...
Since empty_iterator never points anything, so it always points null
(it returns nullptr by operator->). but dereferencing null causes UB.
Just calling std::terminate is of course better.
2019-06-20 20:56:49 +09:00
ToruNiina
5e5a757208
fix: conversion between different basic_value s
2019-06-20 14:35:38 +09:00
ToruNiina
3379ed82ec
refactor: remove meaningless meta conditions
2019-06-19 20:06:06 +09:00
ToruNiina
9663a6bbdb
Merge branch 'master' into v3
2019-06-19 19:53:08 +09:00
ToruNiina
4a2c823d56
fix: comparison between values that has a table
2019-06-19 19:32:25 +09:00
ToruNiina
24c28c7f4f
fix: correct some SFINAE expressions
2019-06-19 18:59:12 +09:00
ToruNiina
7e5859ba73
Merge branch 'master' into v3
2019-06-19 15:36:27 +09:00
ToruNiina
dee32e7d5e
style: make hint messages clearer
2019-06-19 12:58:34 +09:00
ToruNiina
53a185e7a9
fix: revert misjudgement as a bug
...
Probably I'm too tired.
This reverts commit adcd75e017
.
2019-06-18 21:41:30 +09:00
ToruNiina
fd980a8c5d
🔀 Merge branch 'guess-type-error'
2019-06-18 21:29:45 +09:00
ToruNiina
adcd75e017
fix: correctly initialize offset
2019-06-18 21:27:16 +09:00
ToruNiina
32d5c9e924
fix: serialize array correctly
2019-06-18 01:27:52 +09:00
ToruNiina
262f9c5fcc
fix: avoid duplicating comment: array/table elems
2019-06-18 01:26:40 +09:00
ToruNiina
ca084abe90
feat: consider the first comments as a file comment
2019-06-18 00:44:49 +09:00
ToruNiina
7b1a788e2d
feat: enable to convert vector<string> to comments
2019-06-18 00:43:25 +09:00
ToruNiina
f744a792e2
fix: constructor with array-like types
2019-06-17 23:45:43 +09:00