-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed table source columns being off by one
closes #152 also other minor refactors
- Loading branch information
Showing
7 changed files
with
77 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ int main(int argc, char** argv) | |
return 0; | ||
} | ||
|
||
\ecpp | ||
\endcpp | ||
|
||
\see | ||
- toml::parse_file() | ||
|
@@ -108,7 +108,7 @@ int main() | |
|
||
return 0; | ||
} | ||
\ecpp | ||
\endcpp | ||
|
||
\out | ||
[library] | ||
|
@@ -120,7 +120,7 @@ name = 'toml++' | |
authors = [ 'Mark Gillard <[email protected]>' ] | ||
cpp = 17 | ||
name = 'toml++' | ||
\eout | ||
\endout | ||
|
||
\see | ||
- toml::parse_file() | ||
|
@@ -152,7 +152,7 @@ int main() | |
do_stuff_with_your_config(std::move(result).table()); // 'steal' the table from the result | ||
return 0; | ||
} | ||
\ecpp | ||
\endcpp | ||
|
||
|
||
|
||
|
@@ -161,7 +161,7 @@ The examples above use an overloaded `operator<<` with ostreams to print basic e | |
\out | ||
Error while parsing key: expected bare key starting character or string delimiter, saw '?' | ||
(error occurred at line 2, column 5) | ||
\eout | ||
\endout | ||
|
||
The library doesn't natively support error colouring in TTY environments, but instead provides the requisite information | ||
for you to build that and any other custom error handling yourself if necessary via toml::parse_error's source() | ||
|
@@ -181,7 +181,7 @@ catch (const toml::parse_error& err) | |
<< "\n (" << err.source().begin << ")\n"; | ||
return 1; | ||
} | ||
\ecpp | ||
\endcpp | ||
|
||
\see | ||
- toml::parse_error | ||
|
@@ -267,7 +267,7 @@ int main() | |
|
||
return 0; | ||
} | ||
\ecpp | ||
\endcpp | ||
|
||
\out | ||
hello world | ||
|
@@ -281,7 +281,7 @@ numbers: [ 2, 3, 4, 'five', 6.0, 7, [ 8, 9 ] ] | |
cats: [ 'tiger', 'lion', 'puma' ] | ||
fish[1]: 'trout' | ||
dinosaurs: | ||
\eout | ||
\endout | ||
|
||
\see | ||
- toml::node | ||
|
@@ -332,7 +332,7 @@ int main() | |
|
||
return 0; | ||
} | ||
\ecpp | ||
\endcpp | ||
|
||
\out | ||
###### TOML ###### | ||
|
@@ -383,7 +383,7 @@ repo: 'https://github.com/marzer/tomlplusplus/' | |
toml: | ||
- '1.0.0' | ||
- 'and beyond' | ||
\eout | ||
\endout | ||
|
||
\see | ||
- toml::toml_formatter | ||
|
@@ -407,7 +407,7 @@ do it manually before including toml++ in some global header that's used everywh | |
|
||
#define TOML_HEADER_ONLY 0 | ||
#include <toml.hpp> | ||
\ecpp | ||
\endcpp | ||
|
||
<strong>Step 2: Define #TOML_IMPLEMENTATION before including toml++ in one specific translation unit</strong> | ||
|
||
|
@@ -416,7 +416,7 @@ do it manually before including toml++ in some global header that's used everywh | |
|
||
#define TOML_IMPLEMENTATION | ||
#include "global_header_that_includes_toml++.h" | ||
\ecpp | ||
\endcpp | ||
|
||
<strong>Bonus Step: Disable any library features you don't need</strong> | ||
|
||
|
@@ -459,11 +459,11 @@ Add `tomlplusplus/3.1.0` to your conanfile. | |
|
||
\subsection mainpage-adding-lib-dds DDS | ||
Add `tomlpp` to your `package.json5`, e.g.: | ||
\bash | ||
\json | ||
depends: [ | ||
'tomlpp^3.1.0', | ||
] | ||
\ebash | ||
\endjson | ||
|
||
\see [What is DDS?](https://dds.pizza/) | ||
|
||
|
@@ -472,55 +472,55 @@ depends: [ | |
\subsection mainpage-adding-lib-meson Meson | ||
You can install the wrap with: | ||
|
||
\bash | ||
\shell | ||
meson wrap install tomlplusplus | ||
\ebash | ||
\endshell | ||
|
||
After that, you can use it like a regular dependency: | ||
|
||
``` | ||
\meson | ||
tomlplusplus_dep = dependency('tomlplusplus') | ||
``` | ||
\endmeson | ||
|
||
You can also add it as a subproject directly. | ||
|
||
\subsection mainpage-adding-lib-tipi Tipi.build | ||
\subsection mainpage-adding-lib-tipi Tipi.build | ||
|
||
`tomlplusplus` can be easily used in [tipi.build](https://tipi.build) projects by adding the following entry to your `.tipi/deps`: | ||
|
||
\bash | ||
\json | ||
{ | ||
"marzer/tomlplusplus": { } | ||
"marzer/tomlplusplus": { } | ||
} | ||
\ebash | ||
\endjson | ||
|
||
\subsection mainpage-adding-lib-vcpkg Vcpkg | ||
\bash | ||
\shell | ||
vcpkg install tomlplusplus | ||
\ebash | ||
\endshell | ||
|
||
|
||
|
||
\subsection mainpage-adding-lib-cmake-fetch-content CMake FetchContent | ||
\code{.cmake} | ||
\cmake | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
tomlplusplus | ||
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git | ||
GIT_TAG v3.1.0 | ||
) | ||
FetchContent_MakeAvailable(tomlplusplus) | ||
\endcode | ||
\endcmake | ||
|
||
\see [What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html) | ||
|
||
|
||
|
||
\subsection mainpage-adding-lib-git-submodules Git submodules | ||
\bash | ||
\shell | ||
git submodule add --depth 1 https://github.com/marzer/tomlplusplus.git tomlplusplus | ||
git config -f .gitmodules submodule.tomlplusplus.shallow true | ||
\ebash | ||
\endshell | ||
\attention The toml++ repository has some submodules of its own, but **they are only used for testing**! | ||
You should **not** use the `--recursive` option for regular library consumption. | ||
|
||
|
@@ -546,13 +546,13 @@ Parsing data.toml 5000 times: | |
toml: 5.642 s ( 8.12x) | ||
qtoml: 7.760 s (11.17x) | ||
tomlkit: 32.708 s (47.09x) | ||
\eout | ||
\endout | ||
|
||
Install it using `pip`: | ||
|
||
\bash | ||
\shell | ||
pip install pytomlpp | ||
\ebash | ||
\endshell | ||
|
||
Note that I'm not the owner of that project, so if you wish to report a bug relating to the python | ||
implementation please do so at their repository, not on the main toml++ one. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
misk>=0.6.0 | ||
poxy>=0.5.5 | ||
poxy>=0.5.6 | ||
pyyaml | ||
python-dateutil |