summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-14 13:39:01 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-14 17:45:56 +0000
commit24a098793481c5e173e4271f775c96a37f0e6e1c (patch)
tree2688ff8d3c46076b3cb87e883f734df9d3bf87c7 /src/qml/compiler/qv4codegen.cpp
parent929ef25efd402368a9f154b61aa96b4b01a02ce2 (diff)
downloadqtdeclarative-24a098793481c5e173e4271f775c96a37f0e6e1c.tar.gz
Simplify ES module body handling
Now that ImportDeclaration and ExportDeclaration are also statements in the AST, we can get rid of the ModuleItemList in the AST. We keep it in the grammar, but map it to a statement list. Change-Id: I4cab29fe9b075e88454fe3b194126f728000856a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 29af643081..185f1812f7 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -169,7 +169,7 @@ void Codegen::generateFromModule(const QString &fileName,
std::sort(_module->starExportEntries.begin(), _module->starExportEntries.end(), ExportEntry::lessThan);
std::sort(_module->indirectExportEntries.begin(), _module->indirectExportEntries.end(), ExportEntry::lessThan);
- defineFunction(QStringLiteral("%entry"), node, nullptr, node->statements);
+ defineFunction(QStringLiteral("%entry"), node, nullptr, node->body);
}
void Codegen::enterContext(Node *node)