| 184 | |
| 185 | |
| 186 | std::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 | |
| 205 | std::string getLexicalErrorMessage( |
no test coverage detected