forked from qt-creator/qt-creator
QMLJS: Fix punctuation of messages
- Add full stop to the end of messages. - Use double quotes for emphasis (instead of single quotes). Change-Id: I5b0bd2cecda115735b67ceaab202c36ca5d81b43 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1799,7 +1799,7 @@ case 355: {
|
||||
yylloc.startColumn += yylloc.length;
|
||||
yylloc.length = 0;
|
||||
|
||||
//const QString msg = QCoreApplication::translate("QmlParser", "Missing `;'");
|
||||
//const QString msg = QCoreApplication::translate("QmlParser", "Missing \";\".");
|
||||
//diagnostic_messages.append(DiagnosticMessage(Severity::Warning, yylloc, msg));
|
||||
|
||||
first_token = &token_buffer[0];
|
||||
@@ -1829,9 +1829,9 @@ case 355: {
|
||||
QString msg;
|
||||
int token = token_buffer[0].token;
|
||||
if (token < 0 || token >= TERMINAL_COUNT)
|
||||
msg = QCoreApplication::translate("QmlParser", "Syntax error");
|
||||
msg = QCoreApplication::translate("QmlParser", "Syntax error.");
|
||||
else
|
||||
msg = QCoreApplication::translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
|
||||
msg = QCoreApplication::translate("QmlParser", "Unexpected token \"%1\".").arg(QLatin1String(spell[token]));
|
||||
diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
|
||||
|
||||
action = errorState;
|
||||
@@ -1859,7 +1859,7 @@ case 355: {
|
||||
for (int *tk = tokens; *tk != EOF_SYMBOL; ++tk) {
|
||||
int a = t_action(errorState, *tk);
|
||||
if (a > 0 && t_action(a, yytoken)) {
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Expected token \"%1\".").arg(QLatin1String(spell[*tk]));
|
||||
diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
|
||||
|
||||
yytoken = *tk;
|
||||
@@ -1883,7 +1883,7 @@ case 355: {
|
||||
|
||||
int a = t_action(errorState, tk);
|
||||
if (a > 0 && t_action(a, yytoken)) {
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Expected token \"%1\".").arg(QLatin1String(spell[tk]));
|
||||
diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
|
||||
|
||||
yytoken = tk;
|
||||
@@ -1896,7 +1896,7 @@ case 355: {
|
||||
}
|
||||
}
|
||||
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Syntax error");
|
||||
const QString msg = QCoreApplication::translate("QmlParser", "Syntax error.");
|
||||
diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user