diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-03-21 15:17:24 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-27 08:11:09 +0000 |
commit | 0eeaad2bc8da63779d8659666c9bd99463cbe011 (patch) | |
tree | 9c01c87e60a9992a2bd6a7481303ff87a70f66e6 /src/qml/parser/qqmljsast.cpp | |
parent | c3ad706c6ff19a132bf78501430c850040e967fc (diff) |
Add support for 'class' to the AST
Change-Id: I2a9e8fb847dfa45ca77ee43e14f39f2b2def5792
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index 35dd84a161..1a2883e148 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -1129,6 +1129,34 @@ void ComputedPropertyName::accept0(Visitor *visitor) visitor->endVisit(this); } +void ClassExpression::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)) { + accept(property, visitor); + if (next) + accept(next, visitor); + } + + visitor->endVisit(this); +} + +ClassElementList *ClassElementList::finish() +{ + ClassElementList *front = next; + next = nullptr; + return front; +} + } } // namespace QQmlJS::AST QT_QML_END_NAMESPACE |