Separate expression and statement.

This commit is contained in:
chriseth
2017-12-13 12:28:15 +01:00
parent 7614b16dc9
commit 54b6739962
20 changed files with 197 additions and 81 deletions
+4 -4
View File
@@ -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);
}