diff options
author | Lu Guanqun <guanqun.lu@gmail.com> | 2015-12-23 00:44:51 +0800 |
---|---|---|
committer | Lu Guanqun <guanqun.lu@gmail.com> | 2016-01-23 01:14:00 +0800 |
commit | 4fa0326813b4fc9d3c85cb9235f42cf22beead72 (patch) | |
tree | 33e92344628ec38e89a6de665e4a3b2e5404381e /libsolidity/ast/AST_accept.h | |
parent | 67c855c583042ddee6261a9921239a3afd086c14 (diff) | |
download | dexon-solidity-4fa0326813b4fc9d3c85cb9235f42cf22beead72.tar.gz dexon-solidity-4fa0326813b4fc9d3c85cb9235f42cf22beead72.tar.zst dexon-solidity-4fa0326813b4fc9d3c85cb9235f42cf22beead72.zip |
[cond-expr] add an AST node
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)) |