#include "webserv.hpp" #include #include #include #include #include #include #include "TOMLNode.hpp" #include "TOMLParser.hpp" #include "Tokenizer.hpp" /* struct location */ /* { */ /* std::string location; */ /* std::string root; */ /* } */ /* class config */ /* { */ /* std::string name; */ /* } */ namespace config { void display(TOMLMap *config) { std::cout << ">>> printing config: <<<" << std::endl; TOMLMap::iterator it; for (it = config->begin(); it != config->end(); ++it) { std::cout << it->first << ": " << *(it->second->toString()) << std::endl; } } } void parse(void) { std::string filename = "config/simple.toml"; config::TOMLParser parser(filename); toml_node *root = parser.parse(); config::display(root->getMap()); }