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 /src/toml/TomlParser.cpp | |
parent | 9bd6a3a18422e8d176ecb52471af69db41d6683c (diff) | |
download | cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.tar.gz cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.tar.bz2 cru-431cbdbe7d3ae8c45458dcf914717b0365ecd99a.zip |
...
Diffstat (limited to 'src/toml/TomlParser.cpp')
-rw-r--r-- | src/toml/TomlParser.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/toml/TomlParser.cpp b/src/toml/TomlParser.cpp new file mode 100644 index 00000000..d54624f6 --- /dev/null +++ b/src/toml/TomlParser.cpp @@ -0,0 +1,22 @@ +#include "cru/toml/TomlParser.hpp" +#include "cru/toml/TomlDocument.hpp" + +namespace cru::toml { +TomlParser::TomlParser(String input) : input_(std::move(input)) {} + +TomlParser::~TomlParser() = default; + +TomlDocument TomlParser::Parse() { + if (cache_) { + return *cache_; + } + + cache_ = TomlDocument(); + DoParse(*cache_); + return *cache_; +} + +void TomlParser::DoParse(TomlDocument& document) { + // TODO: Implement this. +} +} // namespace cru::toml |