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

Function getLexicalErrorMessage

src/Parsers/parseQuery.cpp:205–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203
204
205std::string getLexicalErrorMessage(
206 const char * begin,
207 const char * end,
208 Token last_token,
209 bool hilite,
210 const std::string & query_description)
211{
212 WriteBufferFromOwnString out;
213 writeCommonErrorMessage(out, begin, end, last_token, query_description);
214 writeQueryAroundTheError(out, begin, end, hilite, &last_token, 1);
215
216 out << getErrorTokenDescription(last_token.type);
217 if (last_token.size())
218 {
219 out << ": '" << StringRef{last_token.begin, last_token.size()} << "'";
220 }
221
222 return out.str();
223}
224
225
226std::string getUnmatchedParenthesesErrorMessage(

Callers 1

tryParseQueryFunction · 0.85

Calls 5

writeCommonErrorMessageFunction · 0.85
writeQueryAroundTheErrorFunction · 0.85
getErrorTokenDescriptionFunction · 0.85
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected