From 9b1f2a7d0efa42f0f07afd398794a3e6fd20db31 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 17 Jun 2019 16:02:23 +0200 Subject: 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 --- src/qml/parser/qqmljsastfwd_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/parser/qqmljsastfwd_p.h') diff --git a/src/qml/parser/qqmljsastfwd_p.h b/src/qml/parser/qqmljsastfwd_p.h index e9caa918d5..6fe108e425 100644 --- a/src/qml/parser/qqmljsastfwd_p.h +++ b/src/qml/parser/qqmljsastfwd_p.h @@ -178,8 +178,10 @@ class UiQualifiedId; class UiHeaderItemList; class UiEnumDeclaration; class UiEnumMemberList; +class UiVersionSpecifier; -} } // namespace AST +} // namespace AST +} // namespace QQmlJS QT_END_NAMESPACE -- cgit v1.2.3