Restrict toHex to bytes.

This commit is contained in:
chriseth
2018-12-05 22:37:05 +01:00
parent 15e28fa444
commit 3a378eae1a
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -724,7 +724,7 @@ bool ASTJsonConverter::visit(Literal const& _node)
std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "token" : "kind", literalTokenKind(_node.token())),
make_pair("value", value),
make_pair(m_legacy ? "hexvalue" : "hexValue", toHex(_node.value())),
make_pair(m_legacy ? "hexvalue" : "hexValue", toHex(asBytes(_node.value()))),
make_pair(
"subdenomination",
subdenomination == Token::Illegal ?