diff options
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r-- | libsolidity/inlineasm/AsmPrinter.cpp | 4 | ||||
-rw-r--r-- | libsolidity/inlineasm/AsmStack.cpp | 2 | ||||
-rw-r--r-- | libsolidity/inlineasm/AsmStack.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/inlineasm/AsmPrinter.cpp b/libsolidity/inlineasm/AsmPrinter.cpp index d829a416..66cf39c0 100644 --- a/libsolidity/inlineasm/AsmPrinter.cpp +++ b/libsolidity/inlineasm/AsmPrinter.cpp @@ -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) diff --git a/libsolidity/inlineasm/AsmStack.cpp b/libsolidity/inlineasm/AsmStack.cpp index 6539e9bc..38d688c1 100644 --- a/libsolidity/inlineasm/AsmStack.cpp +++ b/libsolidity/inlineasm/AsmStack.cpp @@ -49,7 +49,7 @@ bool InlineAssemblyStack::parse(shared_ptr<Scanner> const& _scanner) return true; } -string InlineAssemblyStack::print() +string InlineAssemblyStack::toString() { return AsmPrinter()(*m_parserResult); } diff --git a/libsolidity/inlineasm/AsmStack.h b/libsolidity/inlineasm/AsmStack.h index 71d6c771..4d5a99a4 100644 --- a/libsolidity/inlineasm/AsmStack.h +++ b/libsolidity/inlineasm/AsmStack.h @@ -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(); |