ToruNiina
b3917aaadf
refactor: use snprintf to show char in hex
...
instead of std::ostringstream.
2019-04-16 20:54:29 +09:00
Toru Niina
21fd1271d9
Merge pull request #54 from ToruNiina/hotfix
...
fix: resolve ambiguity in the `""_toml` literal
2019-04-15 13:34:35 +09:00
ToruNiina
f9ab7d6f56
chore: add note about literals to README.md
2019-04-14 20:08:23 +09:00
ToruNiina
0a3a41a708
test: add test for literals for difficult case
2019-04-14 20:06:11 +09:00
ToruNiina
6c2a536fa5
fix: check literal has a table or an array first
...
The literal like this `"[[table]]"_toml` caused a syntax error. It is
because the literal parser first check that it might be a bare value
without a key, and parse_array directory throws syntax_error. This
change makes the parser first check a literal is a name of table, and
then parse the content.
2019-04-14 19:48:43 +09:00
Toru Niina
26eced3640
Merge pull request #52 from ToruNiina/speedup-for-large-files
...
Speedup parsing large files
2019-04-13 16:11:21 +09:00
ToruNiina
6f950c9ec8
perf: cache current line number in location
...
`location::line_num()` function used to be implemented by using
`std::count`, so each time the parser encounters a type mismatch,
`std::count` was called with almost whole file. It decelerates the
parsing process too much, so I decided to add `line_number_` member
variable to `location` and add `advance/retrace/reset` to `location`
in order to modify the position that is pointed.
2019-04-12 18:32:46 +09:00
ToruNiina
ea13e40889
feat: add static_assert for location/range
...
to check the container is randomly-accessible
2019-04-12 18:00:53 +09:00
ToruNiina
595fb1aef3
refactor: remove unused function parameter names
2019-04-06 19:39:13 +09:00
ToruNiina
18986978fb
chore: add short example code to README
2019-03-24 21:30:27 +09:00
ToruNiina
c3cb22a789
chore: fix example of err msg by re-running sample
2019-03-21 18:12:35 +09:00
ToruNiina
5aebd6b562
fix: restore the back compat of format_error
...
the following code was okay in the last release
```
toml::format_error("[test]", v, "test", {"hint1", "hint2"})
```
but was not okay in the current master. This commit fixes this.
cons: By this, the number of values to show is limited upto 3.
2019-03-20 20:46:22 +09:00
ToruNiina
4c13085b35
fix: add stream operator for toml::table
2019-03-20 19:30:08 +09:00
ToruNiina
8709e8a14e
chore: fix incorrect syntax highlight in README
2019-03-20 19:29:03 +09:00
ToruNiina
9eea46ec01
chore: fix typoes and broken links in README
2019-03-20 12:06:55 +09:00
ToruNiina
2e9f937c43
chore: update README
2019-03-20 11:53:03 +09:00
Toru Niina
65b10b6537
Merge pull request #46 from ToruNiina/toml-literal
...
feat: add ""_toml literal
2019-03-20 10:12:56 +09:00
ToruNiina
b51a8d5966
fix: add missing include file in test code
2019-03-20 00:58:58 +09:00
Toru Niina
55e3d70869
Merge pull request #47 from ToruNiina/format-table
...
`toml::format` and top-level table
2019-03-20 00:49:59 +09:00
ToruNiina
20ba57e389
fix: add missing const specifier to some of get()s
2019-03-20 00:37:13 +09:00
ToruNiina
39bc3c64fe
test: add test for ""_toml literals
2019-03-20 00:36:46 +09:00
ToruNiina
40ccf1d912
feat: add argument to control top-level inlinization
2019-03-19 23:25:26 +09:00
ToruNiina
982ae36428
feat: add ""_toml literal
2019-03-19 21:34:57 +09:00
ToruNiina
d6714ec450
feat: detect value type and format as a file
...
in toml::format
2019-03-19 21:24:51 +09:00
ToruNiina
773c3816be
ci: remove needless confirmation on CI
2019-03-19 19:39:45 +09:00
Toru Niina
1b417ddc7a
Merge pull request #45 from ToruNiina/get_or
...
fix `get_or` and add `find_or`
2019-03-19 01:41:21 +09:00
ToruNiina
7a0ecf977d
feat: add find_or(table, key, fallback)
...
get_or(value, fallback) is still ok, but get_or(table, key, fallback)
is now deprecated.
2019-03-18 17:44:03 +09:00
ToruNiina
aade704411
refactor: remove needless overload of get_or
2019-03-18 17:10:18 +09:00
ToruNiina
ca3f6102ef
fix: correctly resolve overloads of get_or
2019-03-18 16:44:36 +09:00
ToruNiina
4a58b629ce
feat: add a way to check arg is "string literal"
2019-03-18 16:31:12 +09:00
ToruNiina
3adba237b8
feat: enable to show message for deprecated()
2019-03-18 16:28:27 +09:00
Toru Niina
ccf03d9291
Merge pull request #44 from ToruNiina/test-link
...
test: add test for multiple translation unit
2019-03-18 15:20:04 +09:00
Toru Niina
30ae90ebd5
Merge pull request #43 from ToruNiina/hotfix
...
fix: incorrect move in constructor and return type deducing in toml::visit
2019-03-18 14:08:23 +09:00
ToruNiina
d5369c3429
test: add test for multiple translation unit
2019-03-18 12:39:58 +09:00
Toru Niina
48f2f0555d
Merge pull request #42 from ToruNiina/test-suite
...
run toml-test suite
2019-03-18 12:33:48 +09:00
ToruNiina
f40fd12e25
refactor: add and rewrite comments
2019-03-18 11:09:12 +09:00
ToruNiina
65c2c3c238
fix: correctly deduce return value of visitor
2019-03-18 10:53:04 +09:00
ToruNiina
891a61a5e3
fix: do not move array element without checking
2019-03-18 02:05:55 +09:00
ToruNiina
1e6f30f6fa
chore: update README.md
2019-03-18 01:50:23 +09:00
ToruNiina
02346a3126
Merge branch 'master' into test-suite
2019-03-18 01:40:17 +09:00
Toru Niina
1908f18e95
Merge pull request #41 from ToruNiina/hotfix
...
fix: simplify and correct the format of timezone
2019-03-18 01:39:11 +09:00
ToruNiina
3bfa7f09ba
test: use the test suite in the effective way
...
add tests/check_toml_test.cpp to compare json object
2019-03-18 01:36:43 +09:00
ToruNiina
243f43fafd
Merge branch 'master' into hotfix
2019-03-17 21:16:37 +09:00
ToruNiina
66e27a94b6
fix: simplify and correct the format of timezone
2019-03-17 21:14:17 +09:00
ToruNiina
227688ec63
ci: make result clearer a bit
2019-03-17 19:36:23 +09:00
ToruNiina
e761a503c0
ci: fix silly mistake in circleci script
2019-03-17 19:27:58 +09:00
ToruNiina
209ad79a8f
ci: fix config file of circleci
2019-03-17 19:26:22 +09:00
ToruNiina
cdf209d7f6
ci: show the status on CI
2019-03-17 19:23:52 +09:00
ToruNiina
77ab391885
ci: fix name of directory and add test script
2019-03-17 19:20:24 +09:00
ToruNiina
6628fe5ace
test: add language agnostic toml-test
2019-03-17 19:12:13 +09:00