aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser/ASTWalker.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-20 21:12:52 +0800
committerchriseth <chris@ethereum.org>2018-01-13 00:21:52 +0800
commit937b95cbe5bcef6c1324c380f37629e5a2a5811a (patch)
treed47456481248f24a90dfa1ae69097fe5f80ec53e /libjulia/optimiser/ASTWalker.cpp
parent0c20b6da6b6c5f8fa72c389648b5da54c13945f9 (diff)
downloaddexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar.gz
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar.bz2
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar.lz
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar.xz
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.tar.zst
dexon-solidity-937b95cbe5bcef6c1324c380f37629e5a2a5811a.zip
Use explicit visit function for the walker.
Diffstat (limited to 'libjulia/optimiser/ASTWalker.cpp')
-rw-r--r--libjulia/optimiser/ASTWalker.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libjulia/optimiser/ASTWalker.cpp b/libjulia/optimiser/ASTWalker.cpp
index 499b4bf2..6386b29d 100644
--- a/libjulia/optimiser/ASTWalker.cpp
+++ b/libjulia/optimiser/ASTWalker.cpp
@@ -44,31 +44,31 @@ void ASTWalker::operator()(FunctionCall const& _funCall)
void ASTWalker::operator()(ExpressionStatement const& _statement)
{
- boost::apply_visitor(*this, _statement.expression);
+ visit(_statement.expression);
}
void ASTWalker::operator()(Assignment const& _assignment)
{
for (auto const& name: _assignment.variableNames)
(*this)(name);
- boost::apply_visitor(*this, *_assignment.value);
+ visit(*_assignment.value);
}
void ASTWalker::operator()(VariableDeclaration const& _varDecl)
{
if (_varDecl.value)
- boost::apply_visitor(*this, *_varDecl.value);
+ visit(*_varDecl.value);
}
void ASTWalker::operator()(If const& _if)
{
- boost::apply_visitor(*this, *_if.condition);
+ visit(*_if.condition);
(*this)(_if.body);
}
void ASTWalker::operator()(Switch const& _switch)
{
- boost::apply_visitor(*this, *_switch.expression);
+ visit(*_switch.expression);
for (auto const& _case: _switch.cases)
{
if (_case.value)
@@ -85,7 +85,7 @@ void ASTWalker::operator()(FunctionDefinition const& _fun)
void ASTWalker::operator()(ForLoop const& _for)
{
(*this)(_for.pre);
- boost::apply_visitor(*this, *_for.condition);
+ visit(*_for.condition);
(*this)(_for.post);
(*this)(_for.body);
}
@@ -107,7 +107,7 @@ void ASTModifier::operator()(FunctionCall& _funCall)
void ASTModifier::operator()(ExpressionStatement& _statement)
{
- boost::apply_visitor(*this, _statement.expression);
+ visit(_statement.expression);
}
void ASTModifier::operator()(Assignment& _assignment)