aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsast_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-08 17:49:59 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-10 20:33:59 +0000
commite839129b6020795483d1f9ba0b3bcfde9f881bab (patch)
tree6b04478a2077d939635e70971720bcc0643ddbb1 /src/qml/parser/qqmljsast_p.h
parent0bd3c9cda678b7e158c6142c1567ac927fde18b9 (diff)
Fix support for default exports in modules
Default export declarations require a binding setup step at run-time, so we hook it into the ESModule's statement list to make it visible to the code gen visitor. We also reserve local slot zero for the default export. Change-Id: Ie064caad0422b92cfdadbd7d94db72a05e95c0cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r--src/qml/parser/qqmljsast_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h
index 0729c99931..9d82e9546b 100644
--- a/src/qml/parser/qqmljsast_p.h
+++ b/src/qml/parser/qqmljsast_p.h
@@ -2675,7 +2675,7 @@ public:
ExportsList *exportsList = nullptr;
};
-class QML_PARSER_EXPORT ExportDeclaration: public Node
+class QML_PARSER_EXPORT ExportDeclaration: public Statement
{
public:
QQMLJS_DECLARE_AST_NODE(ExportDeclaration)
@@ -2753,7 +2753,7 @@ public:
return head;
}
- StatementList *buildStatementList() const;
+ StatementList *buildStatementList(MemoryPool *pool) const;
void accept0(Visitor *visitor) override;
@@ -2773,12 +2773,12 @@ class QML_PARSER_EXPORT ESModule: public Node
public:
QQMLJS_DECLARE_AST_NODE(Module)
- ESModule(ModuleItemList *body)
+ ESModule(ModuleItemList *body, MemoryPool *pool)
: body(body)
{
kind = K;
if (body)
- statements = body->buildStatementList();
+ statements = body->buildStatementList(pool);
}
void accept0(Visitor *visitor) override;