diff options
author | chriseth <c@ethdev.com> | 2016-01-25 04:43:48 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-01-25 04:43:48 +0800 |
commit | 194679f77ada30b04f483e96197e890e41a0c22c (patch) | |
tree | 82ed4cec81cb9dd81cbdc3b8134b80fb7e3de780 /libsolidity/ast/AST_accept.h | |
parent | 67c855c583042ddee6261a9921239a3afd086c14 (diff) | |
parent | 51caa04238ce78420e6efc2ce15842effddf3856 (diff) | |
download | dexon-solidity-194679f77ada30b04f483e96197e890e41a0c22c.tar.gz dexon-solidity-194679f77ada30b04f483e96197e890e41a0c22c.tar.zst dexon-solidity-194679f77ada30b04f483e96197e890e41a0c22c.zip |
Merge pull request #326 from guanqun/cond-expr
support conditional expression _ ? _ : _
Diffstat (limited to 'libsolidity/ast/AST_accept.h')
-rw-r--r-- | libsolidity/ast/AST_accept.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libsolidity/ast/AST_accept.h b/libsolidity/ast/AST_accept.h index 61370c55..dee9d5b1 100644 --- a/libsolidity/ast/AST_accept.h +++ b/libsolidity/ast/AST_accept.h @@ -551,6 +551,28 @@ void VariableDeclarationStatement::accept(ASTConstVisitor& _visitor) const _visitor.endVisit(*this); } +void Conditional::accept(ASTVisitor& _visitor) +{ + if (_visitor.visit(*this)) + { + m_condition->accept(_visitor); + m_trueExpression->accept(_visitor); + m_falseExpression->accept(_visitor); + } + _visitor.endVisit(*this); +} + +void Conditional::accept(ASTConstVisitor& _visitor) const +{ + if (_visitor.visit(*this)) + { + m_condition->accept(_visitor); + m_trueExpression->accept(_visitor); + m_falseExpression->accept(_visitor); + } + _visitor.endVisit(*this); +} + void Assignment::accept(ASTVisitor& _visitor) { if (_visitor.visit(*this)) |