| 207 | |
| 208 | |
| 209 | std::string getUnmatchedParenthesesErrorMessage( |
| 210 | const char * begin, |
| 211 | const char * end, |
| 212 | const UnmatchedParentheses & unmatched_parens, |
| 213 | bool hilite, |
| 214 | const std::string & query_description) |
| 215 | { |
| 216 | WriteBufferFromOwnString out; |
| 217 | writeCommonErrorMessage(out, begin, end, unmatched_parens[0], query_description); |
| 218 | writeQueryAroundTheError(out, begin, end, hilite, unmatched_parens.data(), unmatched_parens.size()); |
| 219 | |
| 220 | out << "Unmatched parentheses: "; |
| 221 | for (const Token & paren : unmatched_parens) |
| 222 | out << *paren.begin; |
| 223 | |
| 224 | return out.str(); |
| 225 | } |
| 226 | |
| 227 | } |
| 228 |
no test coverage detected