diff options
author | LianaHus <liana@ethdev.com> | 2015-09-01 17:19:02 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-08 19:12:00 +0800 |
commit | 02d4198242ec3dacc7af31c9446c83adcf014de9 (patch) | |
tree | 6d000f103d2520ebec433c41726dd30350462d8b /libsolidity/ASTJsonConverter.cpp | |
parent | 1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4 (diff) | |
download | dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar.gz dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar.bz2 dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar.lz dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar.xz dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.tar.zst dexon-solidity-02d4198242ec3dacc7af31c9446c83adcf014de9.zip |
removed get prefix
style fixes
Diffstat (limited to 'libsolidity/ASTJsonConverter.cpp')
-rw-r--r-- | libsolidity/ASTJsonConverter.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libsolidity/ASTJsonConverter.cpp b/libsolidity/ASTJsonConverter.cpp index 82c48a73..3d119a4e 100644 --- a/libsolidity/ASTJsonConverter.cpp +++ b/libsolidity/ASTJsonConverter.cpp @@ -209,7 +209,7 @@ bool ASTJsonConverter::visit(Assignment const& _node) { addJsonNode("Assignment", { make_pair("operator", Token::toString(_node.assignmentOperator())), - make_pair("type", getType(_node)) }, + make_pair("type", type(_node)) }, true); return true; } @@ -219,7 +219,7 @@ bool ASTJsonConverter::visit(UnaryOperation const& _node) addJsonNode("UnaryOperation", { make_pair("prefix", boost::lexical_cast<std::string>(_node.isPrefixOperation())), make_pair("operator", Token::toString(_node.getOperator())), - make_pair("type", getType(_node)) }, + make_pair("type", type(_node)) }, true); return true; } @@ -228,7 +228,7 @@ bool ASTJsonConverter::visit(BinaryOperation const& _node) { addJsonNode("BinaryOperation", { make_pair("operator", Token::toString(_node.getOperator())), - make_pair("type", getType(_node))}, + make_pair("type", type(_node))}, true); return true; } @@ -237,14 +237,14 @@ bool ASTJsonConverter::visit(FunctionCall const& _node) { addJsonNode("FunctionCall", { make_pair("type_conversion", boost::lexical_cast<std::string>(_node.isTypeConversion())), - make_pair("type", getType(_node)) }, + make_pair("type", type(_node)) }, true); return true; } bool ASTJsonConverter::visit(NewExpression const& _node) { - addJsonNode("NewExpression", { make_pair("type", getType(_node)) }, true); + addJsonNode("NewExpression", { make_pair("type", type(_node)) }, true); return true; } @@ -252,28 +252,28 @@ bool ASTJsonConverter::visit(MemberAccess const& _node) { addJsonNode("MemberAccess", { make_pair("member_name", _node.memberName()), - make_pair("type", getType(_node)) }, + make_pair("type", type(_node)) }, true); return true; } bool ASTJsonConverter::visit(IndexAccess const& _node) { - addJsonNode("IndexAccess", { make_pair("type", getType(_node)) }, true); + addJsonNode("IndexAccess", { make_pair("type", type(_node)) }, true); return true; } bool ASTJsonConverter::visit(Identifier const& _node) { addJsonNode("Identifier", - { make_pair("value", _node.name()), make_pair("type", getType(_node)) }); + { make_pair("value", _node.name()), make_pair("type", type(_node)) }); return true; } bool ASTJsonConverter::visit(ElementaryTypeNameExpression const& _node) { addJsonNode("ElementaryTypenameExpression", - { make_pair("value", Token::toString(_node.typeToken())), make_pair("type", getType(_node)) }); + { make_pair("value", Token::toString(_node.typeToken())), make_pair("type", type(_node)) }); return true; } @@ -283,7 +283,7 @@ bool ASTJsonConverter::visit(Literal const& _node) addJsonNode("Literal", { make_pair("string", (tokenString) ? tokenString : "null"), make_pair("value", _node.value()), - make_pair("type", getType(_node)) }); + make_pair("type", type(_node)) }); return true; } @@ -428,7 +428,7 @@ void ASTJsonConverter::process() processed = true; } -string ASTJsonConverter::getType(Expression const& _expression) +string ASTJsonConverter::type(Expression const& _expression) { return (_expression.type()) ? _expression.type()->toString() : "Unknown"; } |