feat: working subtables

This commit is contained in:
3lswear
2022-01-23 13:50:12 +03:00
parent 3b2469b130
commit d9b66c8795
4 changed files with 90 additions and 26 deletions

View File

@@ -16,16 +16,18 @@ namespace config
TOMLMap *root; //root of TOML tree
/* toml_node *current; //node currently being parsed */
Tokenizer tokenizer;
static std::vector<std::string> split_name(std::string name);
static void put_to_subtable(TOMLMap *root,
std::vector<std::string> full_name,
toml_node *map_node);
toml_node *map_node, toml_node::e_type type);
public:
TOMLParser(const std::string filename);
TOMLMap *parse(void);
toml_node *parseMap(void);
void processMap(void);
void parseMapArray(void);

View File

@@ -26,8 +26,7 @@ namespace config
NIL,
OPEN_BRACKET,
CLOSE_BRACKET,
MAP_OPEN,
MAP_CLOSE,
MAP_DECL,
MAPARRAY_DECL
};