| 173 | |
| 174 | |
| 175 | std::string getSyntaxErrorMessage( |
| 176 | const char * begin, |
| 177 | const char * end, |
| 178 | Token last_token, |
| 179 | const Expected & expected, |
| 180 | bool hilite, |
| 181 | const std::string & query_description) |
| 182 | { |
| 183 | WriteBufferFromOwnString out; |
| 184 | writeCommonErrorMessage(out, begin, end, last_token, query_description); |
| 185 | writeQueryAroundTheError(out, begin, end, hilite, &last_token, 1); |
| 186 | |
| 187 | if (!expected.variants.empty()) |
| 188 | out << "Expected " << expected; |
| 189 | |
| 190 | return out.str(); |
| 191 | } |
| 192 | |
| 193 | |
| 194 | std::string getLexicalErrorMessage( |
no test coverage detected