aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-06-17 16:02:23 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-07-04 12:41:09 +0200
commit9b1f2a7d0efa42f0f07afd398794a3e6fd20db31 (patch)
tree14296326c52c48d6553f9ae4c84bf42f33610f48 /src/qml/parser/qqmljsast.cpp
parent1289bd6045818249915028fb345ec29c4ead52e5 (diff)
extend grammar for better version parsing support
Be more strict in parsing version numbers This also makes it easier to access the version number in other places using the Visitor interface, like (soon) the linter and avoids reparsing the text twice. Potential disadvantages: previously allowed import statements will rejected at parse time, e.g. import QtQuick 0b10 Potential further advantage: Weird import statements like import QtQuick 0b10 will be rejected earlier Change-Id: Ifcd187b79a90952bc964c688afa4ea9b158e5109 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r--src/qml/parser/qqmljsast.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp
index e5817ab763..1bc0e6e364 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -1472,6 +1472,12 @@ LeftHandSideExpression *LeftHandSideExpression::leftHandSideExpressionCast()
return this;
}
+void UiVersionSpecifier::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ }
+ visitor->endVisit(this);
+}
} } // namespace QQmlJS::AST
QT_END_NAMESPACE