blob: b5bcaa0bc9c5b5676dc8eb164df4e4230861bbae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|