qmljs: update qmljs parser

Change-Id: I418c3f8c77f36274864edd71d8f86d37587cb3a7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This commit is contained in:
Marco Benelli
2017-12-20 10:47:33 +01:00
parent 5555b7137b
commit a68a545ce2
12 changed files with 1852 additions and 1529 deletions

View File

@@ -711,6 +711,11 @@ again:
return multilineStringLiteral ? T_MULTILINE_STRING_LITERAL : T_STRING_LITERAL;
} else if (_char == QLatin1Char('\\')) {
scanChar();
if (_codePtr > _endPtr) {
_errorCode = IllegalEscapeSequence;
_errorMessage = QCoreApplication::translate("QmlParser", "End of file reached at escape sequence.");
return T_ERROR;
}
QChar u;
@@ -901,7 +906,7 @@ int Lexer::scanNumber(QChar ch)
}
} else if (_char.isDigit() && !qmlMode()) {
_errorCode = IllegalCharacter;
_errorMessage = QCoreApplication::translate("QmlParser", "Decimal numbers cannot start with \"0\".");
_errorMessage = QCoreApplication::translate("QmlParser", "Decimal numbers can't start with \"0\".");
return T_ERROR;
}