PhoenixToml  0.4.0
Toml parser for Phoenix
Loading...
Searching...
No Matches
parser_toml.h File Reference
#include "phoenix_get_string.h"
+ Include dependency graph for parser_toml.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool parser_toml (DicoValue &dico, const PPath &fileName)
 Parse a toml file and update the given DicoValue.
 

Function Documentation

◆ parser_toml()

bool parser_toml ( DicoValue & dico,
const PPath & fileName )

Parse a toml file and update the given DicoValue.

Parameters
[out]dico: dictionary of values
fileName: name of the file to be parsed
Returns
true on success, false otherwise

Definition at line 276 of file parser_toml.cpp.

276 {
277 PFileParser parser;
278 parser.setWhiteSpace(" \n\t");
279 parser.setSeparator(":-'\",{}[]>|");
280 parser.setEscapeChar('\\');
281 if(!parser.open(fileName)){
282 std::cerr << "parser_toml : cannot open file '"<<fileName<<"'" << std::endl;
283 return false;
284 }
285 bool b(parser_toml_fileParser(dico, parser));
286 return b;
287}
bool parser_toml_fileParser(DicoValue &dico, PFileParser &parser)
Parse a yml file and update the given VecValue.

References parser_toml_fileParser().

+ Here is the call graph for this function: