diff options
author | chriseth <chris@ethereum.org> | 2017-12-08 21:01:22 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-12-13 19:28:15 +0800 |
commit | 54b6739962ef45319777ce2aebafdf4b91412d84 (patch) | |
tree | d15c289ebb4e57b16678b93e223bc477e9093b6c /libjulia/optimiser/Substitution.cpp | |
parent | 7614b16dc9b2bb1e267e8f46834b40220fb9f9fb (diff) | |
download | dexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.tar.gz dexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.tar.zst dexon-solidity-54b6739962ef45319777ce2aebafdf4b91412d84.zip |
Separate expression and statement.
Diffstat (limited to 'libjulia/optimiser/Substitution.cpp')
-rw-r--r-- | libjulia/optimiser/Substitution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libjulia/optimiser/Substitution.cpp b/libjulia/optimiser/Substitution.cpp index a49f1f7a..668b6cb6 100644 --- a/libjulia/optimiser/Substitution.cpp +++ b/libjulia/optimiser/Substitution.cpp @@ -26,14 +26,14 @@ using namespace std; using namespace dev; using namespace dev::julia; -Statement Substitution::translate(Statement const& _statement) +Expression Substitution::translate(Expression const& _expression) { - if (_statement.type() == typeid(Identifier)) + if (_expression.type() == typeid(Identifier)) { - string const& name = boost::get<Identifier>(_statement).name; + string const& name = boost::get<Identifier>(_expression).name; if (m_substitutions.count(name)) // No recursive substitution return ASTCopier().translate(*m_substitutions.at(name)); } - return ASTCopier::translate(_statement); + return ASTCopier::translate(_expression); } |