diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-10-14 10:21:04 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-10-14 10:21:04 (GMT) |
commit | f410aa58f93b27a5ba1b82e2f3a87d14338e22a4 (patch) | |
tree | 77a9160e504a04a28d31418274055527f456b901 /src/declarative/qml/qmlrewrite_p.h | |
parent | 712ea07c079c8ac9ea0e397638e7547138b4a087 (diff) | |
download | Qt-f410aa58f93b27a5ba1b82e2f3a87d14338e22a4.zip Qt-f410aa58f93b27a5ba1b82e2f3a87d14338e22a4.tar.gz Qt-f410aa58f93b27a5ba1b82e2f3a87d14338e22a4.tar.bz2 |
Don't rewrite expression statements in loops.
Diffstat (limited to 'src/declarative/qml/qmlrewrite_p.h')
-rw-r--r-- | src/declarative/qml/qmlrewrite_p.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlrewrite_p.h b/src/declarative/qml/qmlrewrite_p.h index b6fe017..449b219 100644 --- a/src/declarative/qml/qmlrewrite_p.h +++ b/src/declarative/qml/qmlrewrite_p.h @@ -76,8 +76,30 @@ protected: void accept(AST::Node *node); QString rewrite(QString code, unsigned position, AST::Statement *node); + virtual bool visit(AST::Block *ast); virtual bool visit(AST::ExpressionStatement *ast); + + virtual bool visit(AST::DoWhileStatement *ast); + virtual void endVisit(AST::DoWhileStatement *ast); + + virtual bool visit(AST::WhileStatement *ast); + virtual void endVisit(AST::WhileStatement *ast); + + virtual bool visit(AST::ForStatement *ast); + virtual void endVisit(AST::ForStatement *ast); + + virtual bool visit(AST::LocalForStatement *ast); + virtual void endVisit(AST::LocalForStatement *ast); + + virtual bool visit(AST::ForEachStatement *ast); + virtual void endVisit(AST::ForEachStatement *ast); + + virtual bool visit(AST::LocalForEachStatement *ast); + virtual void endVisit(AST::LocalForEachStatement *ast); + +private: + QList<AST::Statement *> _loopStack; }; } // namespace QmlRewrite |