MCPcopy Create free account
hub / github.com/catboost/catboost / ParseFile

Method ParseFile

contrib/libs/flatbuffers/src/flatc.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33static const char *FLATC_VERSION() { return FLATBUFFERS_VERSION(); }
34
35void FlatCompiler::ParseFile(
36 flatbuffers::Parser &parser, const std::string &filename,
37 const std::string &contents,
38 const std::vector<const char *> &include_directories) const {
39 auto local_include_directory = flatbuffers::StripFileName(filename);
40
41 std::vector<const char *> inc_directories;
42 inc_directories.insert(inc_directories.end(), include_directories.begin(),
43 include_directories.end());
44 inc_directories.push_back(local_include_directory.c_str());
45 inc_directories.push_back(nullptr);
46
47 if (!parser.Parse(contents.c_str(), &inc_directories[0], filename.c_str())) {
48 Error(parser.error_, false, false);
49 }
50 if (!parser.error_.empty()) { Warn(parser.error_, false); }
51}
52
53void FlatCompiler::LoadBinarySchema(flatbuffers::Parser &parser,
54 const std::string &filename,

Callers

nothing calls this directly

Calls 10

WarnFunction · 0.85
StripFileNameFunction · 0.70
ErrorFunction · 0.70
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45
c_strMethod · 0.45
ParseMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected