diff options
author | chriseth <c@ethdev.com> | 2017-02-14 20:59:15 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-14 22:41:25 +0800 |
commit | ca71b7624db6c731670ddf69873dd9f0c8c6ccd2 (patch) | |
tree | 2381ed6d7ab8324411627288de5bca208ba8c4b5 /libsolidity/inlineasm | |
parent | 80f72437864301562b485cb380eddcea5e6e575f (diff) | |
download | dexon-solidity-ca71b7624db6c731670ddf69873dd9f0c8c6ccd2.tar.gz dexon-solidity-ca71b7624db6c731670ddf69873dd9f0c8c6ccd2.tar.zst dexon-solidity-ca71b7624db6c731670ddf69873dd9f0c8c6ccd2.zip |
Review changes.
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(); |