Added a helper class FunctionCopier in ASTCopier

Helper class that creates a copy of the function definition, replacing the names of the variable
declaration with a new name.
This commit is contained in:
hrkrshnn
2021-03-29 11:02:18 +02:00
parent b42fc2015c
commit 8564d08228
2 changed files with 24 additions and 0 deletions
+6
View File
@@ -171,3 +171,9 @@ TypedName ASTCopier::translate(TypedName const& _typedName)
return TypedName{_typedName.location, translateIdentifier(_typedName.name), _typedName.type};
}
YulString FunctionCopier::translateIdentifier(YulString _name)
{
if (m_translations.count(_name))
return m_translations.at(_name);
return _name;
}