| 224 | |
| 225 | |
| 226 | std::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 |
no test coverage detected