adjusted testcase and renaming

This commit is contained in:
djudjuu
2017-06-06 13:26:23 +02:00
parent 597bf8a43d
commit 62eafdd010
3 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -704,13 +704,12 @@ bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node)
bool ASTJsonConverter::visit(Literal const& _node)
{
string tokenString = tokenKind(_node.token());
Json::Value value{_node.value()};
if (!dev::validateUTF8(_node.value()))
value = Json::nullValue;
Token::Value subdenomination = Token::Value(_node.subDenomination());
std::vector<pair<string, Json::Value>> attributes = {
make_pair(m_legacy ? "token" : "kind", tokenString),
make_pair(m_legacy ? "token" : "kind", literalTokenKind(_node.token())),
make_pair("value", value),
make_pair(m_legacy ? "hexvalue" : "hexValue", toHex(_node.value())),
make_pair(
@@ -793,7 +792,7 @@ string ASTJsonConverter::functionCallKind(FunctionCallKind _kind)
}
}
string ASTJsonConverter::tokenKind(Token::Value _token)
string ASTJsonConverter::literalTokenKind(Token::Value _token)
{
switch (_token)
{
@@ -802,7 +801,6 @@ string ASTJsonConverter::tokenKind(Token::Value _token)
case dev::solidity::Token::StringLiteral:
return "string";
case dev::solidity::Token::TrueLiteral:
return "bool";
case dev::solidity::Token::FalseLiteral:
return "bool";
default: