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

Function getUnmatchedParenthesesErrorMessage

src/Parsers/parseQuery.cpp:226–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225
226std::string getUnmatchedParenthesesErrorMessage(
227 const char * begin,
228 const char * end,
229 const UnmatchedParentheses & unmatched_parens,
230 bool hilite,
231 const std::string & query_description)
232{
233 WriteBufferFromOwnString out;
234 writeCommonErrorMessage(out, begin, end, unmatched_parens[0], query_description);
235 writeQueryAroundTheError(out, begin, end, hilite, unmatched_parens.data(), unmatched_parens.size());
236
237 out << "Unmatched parentheses: ";
238 for (const Token & paren : unmatched_parens)
239 out << *paren.begin;
240
241 return out.str();
242}
243
244}
245

Callers 1

tryParseQueryFunction · 0.85

Calls 5

writeCommonErrorMessageFunction · 0.85
writeQueryAroundTheErrorFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected