aboutsummaryrefslogtreecommitdiffstats
path: root/AST_accept.h
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2014-12-16 00:45:18 +0800
committerLefteris Karapetsas <lefteris@refu.co>2014-12-17 07:03:30 +0800
commitf7029726be3bbf119548a83696402512374d809d (patch)
tree4ba52a22a933d3f2779c8b0301f097b6ffde7ffa /AST_accept.h
parent5b802b685e794832bf8834183bf6c9604e513bbf (diff)
downloaddexon-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.h24
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);