forked from qt-creator/qt-creator
qmljs: update Qml parser to parser of Qt 6.2
this is needed (among other things) for * null coalescing * shebang support Change-Id: I1b37fd86593f143de8b39c0daf433831a8785568 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
@@ -209,7 +209,7 @@ const QString undefinedVersion = QLatin1String("-1.-1");
|
||||
* undefined version (-1.-1) or if it is empty. False otherwise.
|
||||
*/
|
||||
bool QmlJS::maybeModuleVersion(const QString &version) {
|
||||
QRegularExpression re(QLatin1String("^\\d+\\.\\d+$"));
|
||||
QRegularExpression re(QLatin1String("^\\d+\\.-?\\d+$"));
|
||||
return version.isEmpty() || version == undefinedVersion || re.match(version).hasMatch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user