diff options
author | chriseth <c@ethdev.com> | 2015-10-09 00:01:12 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-09 00:25:44 +0800 |
commit | b9a166061bc94cd06458c945d66bf52e76e84b70 (patch) | |
tree | 9e317a5de58a050f49187a0318fff0e4981d7c98 /libsolidity/AST_accept.h | |
parent | 23865e39295dd9199769727b037c1d126807b20e (diff) | |
download | dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.gz dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.bz2 dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.lz dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.xz dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.tar.zst dexon-solidity-b9a166061bc94cd06458c945d66bf52e76e84b70.zip |
Refactoring to allow multi-variable declarations.
Diffstat (limited to 'libsolidity/AST_accept.h')
-rw-r--r-- | libsolidity/AST_accept.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libsolidity/AST_accept.h b/libsolidity/AST_accept.h index dfa9c425..994bfc8d 100644 --- a/libsolidity/AST_accept.h +++ b/libsolidity/AST_accept.h @@ -516,14 +516,26 @@ void ExpressionStatement::accept(ASTConstVisitor& _visitor) const void VariableDeclarationStatement::accept(ASTVisitor& _visitor) { if (_visitor.visit(*this)) - m_variable->accept(_visitor); + { + for (ASTPointer<VariableDeclaration> const& var: m_variables) + if (var) + var->accept(_visitor); + if (m_initialValue) + m_initialValue->accept(_visitor); + } _visitor.endVisit(*this); } void VariableDeclarationStatement::accept(ASTConstVisitor& _visitor) const { if (_visitor.visit(*this)) - m_variable->accept(_visitor); + { + for (ASTPointer<VariableDeclaration> const& var: m_variables) + if (var) + var->accept(_visitor); + if (m_initialValue) + m_initialValue->accept(_visitor); + } _visitor.endVisit(*this); } |