MCPcopy Create free account
hub / github.com/ByConity/ByConity / getSyntaxErrorMessage

Function getSyntaxErrorMessage

src/Parsers/parseQuery.cpp:186–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186std::string getSyntaxErrorMessage(
187 const char * begin,
188 const char * end,
189 Token last_token,
190 const Expected & expected,
191 bool hilite,
192 const std::string & query_description)
193{
194 WriteBufferFromOwnString out;
195 writeCommonErrorMessage(out, begin, end, last_token, query_description);
196 writeQueryAroundTheError(out, begin, end, hilite, &last_token, 1);
197
198 if (!expected.variants.empty())
199 out << "Expected " << expected;
200
201 return out.str();
202}
203
204
205std::string getLexicalErrorMessage(

Callers 1

tryParseQueryFunction · 0.85

Calls 4

writeCommonErrorMessageFunction · 0.85
writeQueryAroundTheErrorFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected