mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user