Commit b6d1b700 authored by Erik Verbruggen's avatar Erik Verbruggen

Band-aid for QTCREATORBUG-509. This needs a bit more work from/with

Roberto.
parent f90f9e48
......@@ -1180,10 +1180,12 @@ case 266: {
}
QString msg = QString::fromUtf8("Unexpected token");
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
if (token_buffer[0].token >= 0 && token_buffer[0].token < TERMINAL_COUNT) { // ### FIXME: band-aid, see QTCREATORBUG-509.
if (const char *tokenSpell = spell[token_buffer[0].token]) {
msg += QLatin1String(": `");
msg += QLatin1String(tokenSpell);
msg += QLatin1Char('\'');
}
}
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment