aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-03-20 21:46:29 +0100
committerLars Knoll <lars.knoll@qt.io>2018-04-26 21:37:42 +0000
commit09cd6f8020b7c25eaaf959a48c452b01aebcf627 (patch)
tree69749d463a95d123aabcfea807a0a689bc8fcd2f /src/qml/parser/qqmljsast_p.h
parentcfac31cd823bd8eb83900adeecbfd3d789a3ee1d (diff)
Add support for 'super' and 'new.target' to the AST
Codegen will still throw a Syntax error on it though. Change-Id: I292dd166ad8cb4a62f2bcfa9637bdc76cf95bb51 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r--src/qml/parser/qqmljsast_p.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index 60a3fdf589..cd5c3a1021 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -148,6 +148,7 @@ public:
Kind_Expression,
Kind_ExpressionStatement,
Kind_FalseLiteral,
+ Kind_SuperLiteral,
Kind_FieldMemberExpression,
Kind_Finally,
Kind_ForEachStatement,
@@ -391,6 +392,26 @@ public:
SourceLocation falseToken;
};
+class QML_PARSER_EXPORT SuperLiteral : public ExpressionNode
+{
+public:
+ QQMLJS_DECLARE_AST_NODE(SuperLiteral)
+
+ SuperLiteral() { kind = K; }
+
+ void accept0(Visitor *visitor) override;
+
+ SourceLocation firstSourceLocation() const override
+ { return superToken; }
+
+ SourceLocation lastSourceLocation() const override
+ { return superToken; }
+
+// attributes
+ SourceLocation superToken;
+};
+
+
class QML_PARSER_EXPORT NumericLiteral: public ExpressionNode
{
public: