diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2014-12-16 00:45:18 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2014-12-17 07:03:30 +0800 |
commit | f7029726be3bbf119548a83696402512374d809d (patch) | |
tree | 4ba52a22a933d3f2779c8b0301f097b6ffde7ffa /AST_accept.h | |
parent | 5b802b685e794832bf8834183bf6c9604e513bbf (diff) | |
download | dexon-solidity-f7029726be3bbf119548a83696402512374d809d.tar.gz dexon-solidity-f7029726be3bbf119548a83696402512374d809d.tar.zst dexon-solidity-f7029726be3bbf119548a83696402512374d809d.zip |
Adding a ForStatement solidity AST Node.
- Adding ForStatement node
- Implemented Parsing for ForStatement
- A simple parsing test for the ForStatement
- Work in progress
Diffstat (limited to 'AST_accept.h')
-rw-r--r-- | AST_accept.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/AST_accept.h b/AST_accept.h index e0454d33..ffef6f8b 100644 --- a/AST_accept.h +++ b/AST_accept.h @@ -267,6 +267,30 @@ void WhileStatement::accept(ASTConstVisitor& _visitor) const _visitor.endVisit(*this); } +void ForStatement::accept(ASTVisitor& _visitor) +{ + if (_visitor.visit(*this)) + { + m_initExpression->accept(_visitor); + m_condExpression->accept(_visitor); + m_loopExpression->accept(_visitor); + m_body->accept(_visitor); + } + _visitor.endVisit(*this); +} + +void ForStatement::accept(ASTConstVisitor& _visitor) const +{ + if (_visitor.visit(*this)) + { + m_initExpression->accept(_visitor); + m_condExpression->accept(_visitor); + m_loopExpression->accept(_visitor); + m_body->accept(_visitor); + } + _visitor.endVisit(*this); +} + void Continue::accept(ASTVisitor& _visitor) { _visitor.visit(*this); |