Review changes.

This commit is contained in:
chriseth 2017-02-14 13:59:15 +01:00
parent 80f7243786
commit ca71b7624d
3 changed files with 4 additions and 4 deletions

View File

@ -71,11 +71,11 @@ string AsmPrinter::operator()(assembly::Literal const& _literal)
{
ostringstream o;
o << std::hex << setfill('0') << setw(2) << unsigned(c);
out += "0x" + o.str();
out += "\\x" + o.str();
}
else
out += c;
return out;
return "\"" + out + "\"";
}
string AsmPrinter::operator()(assembly::Identifier const& _identifier)

View File

@ -49,7 +49,7 @@ bool InlineAssemblyStack::parse(shared_ptr<Scanner> const& _scanner)
return true;
}
string InlineAssemblyStack::print()
string InlineAssemblyStack::toString()
{
return AsmPrinter()(*m_parserResult);
}

View File

@ -48,7 +48,7 @@ public:
bool parse(std::shared_ptr<Scanner> const& _scanner);
/// Converts the parser result back into a string form (not necessarily the same form
/// as the source form, but it should parse into the same parsed form again).
std::string print();
std::string toString();
eth::Assembly assemble();