diff options
| author | crupest <crupest@outlook.com> | 2022-01-08 16:31:09 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-01-08 16:31:09 +0800 |
| commit | 431cbdbe7d3ae8c45458dcf914717b0365ecd99a (patch) | |
| tree | c5e593ee1149d0fe3359c010b305ca4e14b8f1c0 /include/cru/toml/TomlParser.hpp | |
| parent | 9bd6a3a18422e8d176ecb52471af69db41d6683c (diff) | |
| download | cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.tar.gz cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.tar.bz2 cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.zip | |
...
Diffstat (limited to 'include/cru/toml/TomlParser.hpp')
| -rw-r--r-- | include/cru/toml/TomlParser.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/cru/toml/TomlParser.hpp b/include/cru/toml/TomlParser.hpp new file mode 100644 index 00000000..b5bcaa0b --- /dev/null +++ b/include/cru/toml/TomlParser.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include "cru/toml/TomlDocument.hpp" + +#include <optional> + +namespace cru::toml { +class TomlParser { + public: + explicit TomlParser(String input); + + CRU_DELETE_COPY(TomlParser) + CRU_DELETE_MOVE(TomlParser) + + ~TomlParser(); + + public: + TomlDocument Parse(); + + private: + // The document is empty to begin with. + void DoParse(TomlDocument& document); + + private: + String input_; + + std::optional<TomlDocument> cache_; +}; +} // namespace cru::toml |
