diff options
author | chriseth <chris@ethereum.org> | 2017-05-19 23:48:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 23:48:36 +0800 |
commit | 982f661339e695f4ad913ff17bc12a9e190b25ed (patch) | |
tree | 421c93ff249d89f3778dae422cea3ebcec7a9e4c /libsolidity/inlineasm/AsmPrinter.cpp | |
parent | 6f9428e9008f9d979caf7ff2f67ae85c784a0111 (diff) | |
parent | ebcb27e5c14549d114c116889c730c3a8cd82a86 (diff) | |
download | dexon-solidity-982f661339e695f4ad913ff17bc12a9e190b25ed.tar.gz dexon-solidity-982f661339e695f4ad913ff17bc12a9e190b25ed.tar.zst dexon-solidity-982f661339e695f4ad913ff17bc12a9e190b25ed.zip |
Merge pull request #2223 from ethereum/julia-bool
Add support for bool literals in Julia
Diffstat (limited to 'libsolidity/inlineasm/AsmPrinter.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmPrinter.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmPrinter.cpp b/libsolidity/inlineasm/AsmPrinter.cpp index f3b66aee..636e61b8 100644 --- a/libsolidity/inlineasm/AsmPrinter.cpp +++ b/libsolidity/inlineasm/AsmPrinter.cpp @@ -46,8 +46,16 @@ string AsmPrinter::operator()(assembly::Instruction const& _instruction) string AsmPrinter::operator()(assembly::Literal const& _literal) { - if (_literal.isNumber) + switch (_literal.kind) + { + case LiteralKind::Number: return _literal.value + appendTypeName(_literal.type); + case LiteralKind::Boolean: + return ((_literal.value == "true") ? "true" : "false") + appendTypeName(_literal.type); + case LiteralKind::String: + break; + } + string out; for (char c: _literal.value) if (c == '\\') |