diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-02-09 20:22:09 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-25 17:49:03 +0000 |
commit | 2683a22364f742e3809b6c48570b0b4aaf37b31f (patch) | |
tree | aff06f7313424ee8481da880168b7129455e6bc9 /src/qml/parser/qqmljsast.cpp | |
parent | dad5d1cc82a57a4f657aa3f37ad2f55b69d5b015 (diff) |
Implement support for tagged templates
Get Foo`...` to work as intended by the spec.
Change-Id: If6ccdd7486d3c983c177a3e126e3a661e210a8ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index 6fdfd8279c..b29450c1df 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -158,6 +158,8 @@ void StringLiteral::accept0(Visitor *visitor) void TemplateLiteral::accept0(Visitor *visitor) { if (visitor->visit(this)) { + if (next) + accept(next, visitor); } visitor->endVisit(this); @@ -992,6 +994,15 @@ void UiEnumMemberList::accept0(Visitor *visitor) visitor->endVisit(this); } +void TaggedTemplate::accept0(Visitor *visitor) +{ + if (visitor->visit(this)) { + accept(templateLiteral, visitor); + } + + visitor->endVisit(this); +} + } } // namespace QQmlJS::AST QT_QML_END_NAMESPACE |