diff options
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r-- | src/qml/parser/qqmljsast_p.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h index ed3c83badf..5f094ad4f5 100644 --- a/src/qml/parser/qqmljsast_p.h +++ b/src/qml/parser/qqmljsast_p.h @@ -188,6 +188,7 @@ public: Kind_StringLiteral, Kind_StringLiteralPropertyName, Kind_SwitchStatement, + Kind_TemplateLiteral, Kind_ThisExpression, Kind_ThrowStatement, Kind_TildeExpression, @@ -428,6 +429,29 @@ public: SourceLocation literalToken; }; +class QML_PARSER_EXPORT TemplateLiteral : public ExpressionNode +{ +public: + QQMLJS_DECLARE_AST_NODE(TemplateLiteral) + + TemplateLiteral(const QStringRef &str, ExpressionNode *e) + : value(str), expression(e), next(nullptr) + { kind = K; } + + SourceLocation firstSourceLocation() const override + { return literalToken; } + + SourceLocation lastSourceLocation() const override + { return next ? next->lastSourceLocation() : literalToken; } + + void accept0(Visitor *visitor) override; + + QStringRef value; + ExpressionNode *expression; + SourceLocation literalToken; + TemplateLiteral *next; +}; + class QML_PARSER_EXPORT RegExpLiteral: public ExpressionNode { public: |