MCPcopy Create free account
hub / github.com/baidu/tera / ParseFromFile

Method ParseFromFile

src/utils/prop_tree.cc:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149bool PropTree::ParseFromFile(const std::string& file) {
150 std::ifstream fin(file.c_str());
151 std::string input;
152 if (fin.good()) {
153 std::string str;
154 while (std::getline(fin, str)) {
155 input.append(str + "\n");
156 }
157 } else {
158 AddError("syntax error: input file error.");
159 return false;
160 }
161 return ParseFromString(input);
162}
163
164bool PropTree::ParseNodeFromTokens(std::deque<Tokenizer::Token>& tokens, int depth, Node** node) {
165 if (tokens.size() == 0) {

Callers 1

ParseTableSchemaFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected