aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-21 22:57:07 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-26 10:04:04 +0000
commit5faf2e9a693d10e1e689c42deec911083a35ddb2 (patch)
tree58d56608b05274c89139175b6664d7157437aa7e /src/qml/parser/qqmljsast.cpp
parentb797006c4491127f5c34f8eca49c6d1d576941db (diff)
Properly distinguish between class expressions and declarations
Introduce both types in the AST, and handle them properly in the code generator. Change-Id: I754ac0976de69009bdb8b203d890e4ec0ad03b30 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r--src/qml/parser/qqmljsast.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp
index 1c997e1de7..89ef861c85 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -1296,6 +1296,16 @@ void ClassExpression::accept0(Visitor *visitor)
visitor->endVisit(this);
}
+void ClassDeclaration::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(heritage, visitor);
+ accept(elements, visitor);
+ }
+
+ visitor->endVisit(this);
+}
+
void ClassElementList::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {