forked from qt-creator/qt-creator
QmlJs: sync qmljs parser
The last version of the grammar contains some constructs that the code model needs to know. Task-number: QTCREATORBUG-17842 Change-Id: I6250f96431acc05b19f3fd1b6cc268a07485cf0f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -174,6 +174,15 @@ bool QmlDirParser::parse(const QString &source)
|
||||
|
||||
_plugins.append(entry);
|
||||
|
||||
} else if (sections[0] == QLatin1String("classname")) {
|
||||
if (sectionCount < 2) {
|
||||
reportError(lineNumber, 0,
|
||||
QStringLiteral("classname directive requires an argument, but %1 were provided").arg(sectionCount - 1));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ignore these. qmlimportscanner uses them.
|
||||
} else if (sections[0] == QLatin1String("internal")) {
|
||||
if (sectionCount != 3) {
|
||||
reportError(lineNumber, 0,
|
||||
|
||||
Reference in New Issue
Block a user