diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-05-09 14:03:39 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-11 07:17:22 +0000 |
commit | e3b9726483cb7336aa54ae7d9455becbd148b2b6 (patch) | |
tree | ba056c898a9a694179104e1fd4f4f32d91a6dd86 /src/qml/compiler/qv4compilerscanfunctions_p.h | |
parent | 541b8220cffbbae4b798ae8282d04ca145caccd1 (diff) |
Improve for-in and for-of support
Create a Block scope per iteration as defined in the ES spec. So
closures created inside the loop will remember the iteration variable
at that loop iteration.
Add support for destructuring of the left hand side expression or
declaration.
Change-Id: Id06ef94e2a4b93646827da4f6ce922eb436e5a31
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h index 7d29af4fa3..640ee86c0b 100644 --- a/src/qml/compiler/qv4compilerscanfunctions_p.h +++ b/src/qml/compiler/qv4compilerscanfunctions_p.h @@ -127,6 +127,8 @@ protected: bool visit(AST::ForStatement *ast) override; bool visit(AST::LocalForStatement *ast) override; bool visit(AST::ForEachStatement *ast) override; + void endVisit(AST::ForEachStatement *) override; + bool visit(AST::ThisExpression *ast) override; bool visit(AST::Block *ast) override; |