|
Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
|
#include "preprocessor.hpp"#include "array.hpp"#include "date_time.hpp"#include "parse_error.hpp"#include "parser.hpp"#include "source_region.hpp"#include "std_optional.hpp"#include "table.hpp"#include "unicode.hpp"#include "value.hpp"#include <fstream>#include <istream>#include <sstream>#include <iomanip>#include "header_start.hpp"#include "header_end.hpp"

Go to the source code of this file.
Data Structures | |
| class | utf8_byte_stream< std::basic_string_view< Char > > |
| class | utf8_byte_stream< std::istream > |
| struct | utf8_codepoint |
| struct | utf8_reader_interface |
| class | utf8_reader< T > |
| class | utf8_buffered_reader |
| struct | parse_integer_traits< 2 > |
| struct | parse_integer_traits< 8 > |
| struct | parse_integer_traits< 10 > |
| struct | parse_integer_traits< 16 > |
| struct | escaped_codepoint |
| struct | error_builder |
| struct | parse_scope |
| struct | parse_key_buffer |
| struct | depth_counter_scope |
| struct | parsed_string |
| struct | table_vector_scope |
| class | parser |
Functions | |
| template<typename Char > | |
| utf8_reader (std::basic_string_view< Char >, std::string_view) -> utf8_reader< std::basic_string_view< Char > > | |
| template<typename Char > | |
| utf8_reader (std::basic_string_view< Char >, std::string &&) -> utf8_reader< std::basic_string_view< Char > > | |
| template<typename Char > | |
| utf8_reader (std::basic_istream< Char > &, std::string_view) -> utf8_reader< std::basic_istream< Char > > | |
| template<typename Char > | |
| utf8_reader (std::basic_istream< Char > &, std::string &&) -> utf8_reader< std::basic_istream< Char > > | |
| TOML_PURE_GETTER TOML_INTERNAL_LINKAGE std::string_view | to_sv (node_type val) noexcept |
| TOML_PURE_GETTER TOML_INTERNAL_LINKAGE std::string_view | to_sv (const std::string &str) noexcept |
| TOML_CONST_GETTER TOML_INTERNAL_LINKAGE std::string_view | to_sv (bool val) noexcept |
| TOML_PURE_GETTER TOML_INTERNAL_LINKAGE std::string_view | to_sv (const utf8_codepoint &cp) noexcept |
| TOML_PURE_GETTER TOML_INTERNAL_LINKAGE std::string_view | to_sv (const utf8_codepoint *cp) noexcept |
| template<typename T > | |
| TOML_INTERNAL_LINKAGE void | concatenate (char *&write_pos, char *const buf_end, const T &arg) noexcept |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::string_view doc, std::string_view source_path) |
| Parses a TOML document from a string view. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::string_view doc, std::string &&source_path) |
| Parses a TOML document from a string view. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::istream &doc, std::string_view source_path) |
| Parses a TOML document from a stream. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::istream &doc, std::string &&source_path) |
| Parses a TOML document from a stream. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse_file (std::string_view file_path) |
| Parses a TOML document from a file. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::string_view doc, std::wstring_view source_path) |
| Parses a TOML document from a string view. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse (std::istream &doc, std::wstring_view source_path) |
| Parses a TOML document from a stream. | |
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV | parse_file (std::wstring_view file_path) |
| Parses a TOML document from a file. | |
| #define advance_and_return_if_error | ( | ... | ) |
Definition at line 867 of file parser.inl.
| #define advance_and_return_if_error_or_eof | ( | ... | ) |
Definition at line 874 of file parser.inl.
| #define assert_not_eof | ( | ) | TOML_ASSERT_ASSUME(cp != nullptr) |
Definition at line 809 of file parser.inl.
| #define assert_not_error | ( | ) | TOML_ASSERT(!is_error()) |
Definition at line 824 of file parser.inl.
| #define is_eof | ( | ) | !cp |
Definition at line 808 of file parser.inl.
| #define is_error | ( | ) | !!err |
Definition at line 822 of file parser.inl.
| #define parse_error_break | ( | ) | static_assert(true) |
Definition at line 851 of file parser.inl.
| #define push_parse_scope | ( | scope | ) | push_parse_scope_1(scope, __LINE__) |
Definition at line 726 of file parser.inl.
| #define push_parse_scope_1 | ( | scope, | |
| line | |||
| ) | push_parse_scope_2(scope, line) |
Definition at line 725 of file parser.inl.
| #define push_parse_scope_2 | ( | scope, | |
| line | |||
| ) | parse_scope ps_##line(current_scope, scope) |
Definition at line 724 of file parser.inl.
| #define return_after_error | ( | ... | ) | return __VA_ARGS__ |
Definition at line 823 of file parser.inl.
| #define return_if_eof | ( | ... | ) |
Definition at line 810 of file parser.inl.
| #define return_if_error | ( | ... | ) |
Definition at line 825 of file parser.inl.
| #define return_if_error_or_eof | ( | ... | ) |
Definition at line 829 of file parser.inl.
| #define set_error_and_return | ( | ret, | |
| ... | |||
| ) |
Definition at line 854 of file parser.inl.
| #define set_error_and_return_default | ( | ... | ) | set_error_and_return({}, __VA_ARGS__) |
Definition at line 860 of file parser.inl.
| #define set_error_and_return_if_eof | ( | ... | ) |
Definition at line 862 of file parser.inl.
| #define TOML_OVERALIGNED alignas(32) |
Definition at line 192 of file parser.inl.
| #define TOML_RETURNS_BY_THROWING |
Definition at line 505 of file parser.inl.
| #define utf8_buffered_reader_error_check | ( | ... | ) |
Definition at line 407 of file parser.inl.
| #define utf8_reader_error | ( | ... | ) | err_.emplace(__VA_ARGS__) |
Definition at line 180 of file parser.inl.
| #define utf8_reader_error_check | ( | ... | ) |
Definition at line 182 of file parser.inl.
| #define utf8_reader_return_after_error | ( | ... | ) | return __VA_ARGS__ |
Definition at line 181 of file parser.inl.
|
noexcept |
Definition at line 601 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
| std::string && | source_path | ||
| ) |
Parses a TOML document from a stream.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss, "foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3441 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
| std::string_view | source_path = {} |
||
| ) |
Parses a TOML document from a stream.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3436 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::istream & | doc, |
| std::wstring_view | source_path | ||
| ) |
Parses a TOML document from a stream.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp std::stringstream ss; ss << "a = 3"sv;
auto tbl = toml::parse(ss); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3483 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
| std::string && | source_path | ||
| ) |
Parses a TOML document from a string view.
\detail \cpp auto tbl = toml::parse("a = 3"sv, "foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3430 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
| std::string_view | source_path = {} |
||
| ) |
Parses a TOML document from a string view.
\detail \cpp auto tbl = toml::parse("a = 3"sv); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3425 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse | ( | std::string_view | doc, |
| std::wstring_view | source_path | ||
| ) |
Parses a TOML document from a string view.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp auto tbl = toml::parse("a = 3"sv, L"foo.toml"); std::cout << tbl["a"] << "\n"; \ecpp
\out 3 \eout
| doc | The TOML document to parse. Must be valid UTF-8. |
| source_path | The path used to initialize each node's source().path. If you don't have a path (or you have no intention of using paths in diagnostics) then this parameter can safely be left blank. |
Definition at line 3477 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse_file | ( | std::string_view | file_path | ) |
Parses a TOML document from a file.
\detail \cpp toml::parse_result get_foo_toml() { return toml::parse_file("foo.toml"); } \ecpp
| file_path | The TOML document to parse. Must be valid UTF-8. |
Definition at line 3447 of file parser.inl.
| TOML_EXTERNAL_LINKAGE parse_result TOML_CALLCONV parse_file | ( | std::wstring_view | file_path | ) |
Parses a TOML document from a file.
\availability This overload is only available when TOML_ENABLE_WINDOWS_COMPAT is enabled.
\detail \cpp toml::parse_result get_foo_toml() { return toml::parse_file(L"foo.toml"); } \ecpp
| file_path | The TOML document to parse. Must be valid UTF-8. |
Definition at line 3489 of file parser.inl.
|
noexcept |
Definition at line 571 of file parser.inl.
|
noexcept |
Definition at line 565 of file parser.inl.
|
noexcept |
Definition at line 579 of file parser.inl.
|
noexcept |
Definition at line 590 of file parser.inl.
|
noexcept |
Definition at line 559 of file parser.inl.
| utf8_reader | ( | std::basic_istream< Char > & | , |
| std::string && | |||
| ) | -> utf8_reader< std::basic_istream< Char > > |
| utf8_reader | ( | std::basic_istream< Char > & | , |
| std::string_view | |||
| ) | -> utf8_reader< std::basic_istream< Char > > |
| utf8_reader | ( | std::basic_string_view< Char > | , |
| std::string && | |||
| ) | -> utf8_reader< std::basic_string_view< Char > > |
| utf8_reader | ( | std::basic_string_view< Char > | , |
| std::string_view | |||
| ) | -> utf8_reader< std::basic_string_view< Char > > |
| TOML_ABI_NAMESPACE_END |
Definition at line 3330 of file parser.inl.
| TOML_ANON_NAMESPACE_END |
Definition at line 496 of file parser.inl.
| TOML_ANON_NAMESPACE_START |
Definition at line 43 of file parser.inl.
| TOML_DISABLE_WARNINGS |
Definition at line 24 of file parser.inl.
| TOML_ENABLE_WARNINGS |
Definition at line 36 of file parser.inl.
| TOML_IMPL_NAMESPACE_END |
Definition at line 3332 of file parser.inl.
| TOML_IMPL_NAMESPACE_START |
Definition at line 884 of file parser.inl.
| TOML_NAMESPACE_END |
Definition at line 3507 of file parser.inl.
| TOML_NAMESPACE_START |
Definition at line 3421 of file parser.inl.
|
constexpr |
Definition at line 48 of file parser.inl.