aboutsummaryrefslogtreecommitdiff
path: root/src/toml/TomlParser.cpp
blob: d54624f6a75e45bdffc305a19b09301ca8acf8fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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