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.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.h')
-rw-r--r-- | AST.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -509,6 +509,30 @@ private: ASTPointer<Statement> m_body; }; +class ForStatement: public BreakableStatement +{ +public: + ForStatement(Location const& _location, + ASTPointer<ASTNode> const& _initExpression, + ASTPointer<Expression> const& _conditionExpression, + ASTPointer<ExpressionStatement> const& _loopExpression, + ASTPointer<Statement> const& _body): + BreakableStatement(_location), + m_initExpression(_initExpression), + m_condExpression(_conditionExpression), + m_loopExpression(_loopExpression), + m_body(_body) {} + virtual void accept(ASTVisitor& _visitor) override; + virtual void accept(ASTConstVisitor& _visitor) const override; + virtual void checkTypeRequirements() override; + +private: + ASTPointer<ASTNode> m_initExpression; + ASTPointer<Expression> m_condExpression; + ASTPointer<ExpressionStatement> m_loopExpression; + ASTPointer<Statement> m_body; +}; + class Continue: public Statement { public: |