diff options
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); } |