MCPcopy Create free account
hub / github.com/Tencent/phxrpc / MyErrorPrinter

Class MyErrorPrinter

codegen/proto_utils.cpp:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37
38class MyErrorPrinter : public MultiFileErrorCollector {
39 public:
40 MyErrorPrinter() {
41 }
42 virtual ~MyErrorPrinter() override {
43 }
44
45 void AddError(const std::string& file_name, int line, int column, const std::string& message) {
46
47 fprintf(stderr, "%s", file_name.c_str());
48
49 if (line != -1)
50 fprintf(stderr, ":%d:%d", line + 1, column + 1);
51
52 fprintf(stderr, ": %s\n", message.c_str());
53 }
54};
55
56int ProtoUtils::Parse(const char *file, SyntaxTree *stree, const vector<string> &include_list) {
57 return Parse(file, stree, nullptr, include_list);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected