aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/optimiser/ASTWalker.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-08 21:01:22 +0800
committerchriseth <chris@ethereum.org>2017-12-13 19:28:15 +0800
commit54b6739962ef45319777ce2aebafdf4b91412d84 (patch)
treed15c289ebb4e57b16678b93e223bc477e9093b6c /libjulia/optimiser/ASTWalker.cpp
parent7614b16dc9b2bb1e267e8f46834b40220fb9f9fb (diff)
downloaddexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.tar.gz
dexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.tar.zst
dexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.zip
Separate expression and statement.
Diffstat (limited to 'libjulia/optimiser/ASTWalker.cpp')
-rw-r--r--libjulia/optimiser/ASTWalker.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libjulia/optimiser/ASTWalker.cpp b/libjulia/optimiser/ASTWalker.cpp
index 0caef04e..499b4bf2 100644
--- a/libjulia/optimiser/ASTWalker.cpp
+++ b/libjulia/optimiser/ASTWalker.cpp
@@ -42,6 +42,11 @@ void ASTWalker::operator()(FunctionCall const& _funCall)
walkVector(_funCall.arguments | boost::adaptors::reversed);
}
+void ASTWalker::operator()(ExpressionStatement const& _statement)
+{
+ boost::apply_visitor(*this, _statement.expression);
+}
+
void ASTWalker::operator()(Assignment const& _assignment)
{
for (auto const& name: _assignment.variableNames)
@@ -100,6 +105,11 @@ void ASTModifier::operator()(FunctionCall& _funCall)
walkVector(_funCall.arguments | boost::adaptors::reversed);
}
+void ASTModifier::operator()(ExpressionStatement& _statement)
+{
+ boost::apply_visitor(*this, _statement.expression);
+}
+
void ASTModifier::operator()(Assignment& _assignment)
{
for (auto& name: _assignment.variableNames)