mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use new escaping helpers for type identifiers
This commit is contained in:
parent
842fd0cd2c
commit
26047b784b
@ -261,6 +261,17 @@ string Type::escapeIdentifier(string const& _identifier)
|
||||
return ret;
|
||||
}
|
||||
|
||||
string Type::unescapeIdentifier(string const& _identifier)
|
||||
{
|
||||
string ret = _identifier;
|
||||
// FIXME: should be _$$$_
|
||||
boost::algorithm::replace_all(ret, "$$$", "$");
|
||||
boost::algorithm::replace_all(ret, "_$_", ",");
|
||||
boost::algorithm::replace_all(ret, "$_", "(");
|
||||
boost::algorithm::replace_all(ret, "_$", ")");
|
||||
return ret;
|
||||
}
|
||||
|
||||
TypePointer Type::fromElementaryTypeName(ElementaryTypeNameToken const& _type)
|
||||
{
|
||||
solAssert(Token::isElementaryTypeName(_type.token()),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user