mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactoring to allow multi-variable declarations.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user