aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-03-16 19:58:06 +0100
committerLars Knoll <lars.knoll@qt.io>2018-04-26 21:37:27 +0000
commita62101f2df57997158f69c2483323287fb018d26 (patch)
tree592f730de855b6f7c236da34bd5e23de9874015f /src/qml/parser/qqmljsast.cpp
parent67ce06f2c0642fa0a9a4eb4f2239cb99a62d2040 (diff)
Add partial support for computed property names
Computed property names currently work in object literals and destructuring arguments. Change-Id: I9dc5bc61b45139ef1836072695ea2fe1ce4994ae 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 a80b2d422e..b480cdf76c 100644
--- a/src/qml/parser/qqmljsast.cpp
+++ b/src/qml/parser/qqmljsast.cpp
@@ -1101,6 +1101,16 @@ void ArrayBindingPattern::accept0(Visitor *visitor)
visitor->endVisit(this);
}
+void ComputedPropertyName::accept0(Visitor *visitor)
+{
+ if (visitor->visit(this)) {
+ accept(expression, visitor);
+ }
+
+ visitor->endVisit(this);
+
+}
+
} } // namespace QQmlJS::AST
QT_QML_END_NAMESPACE