aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ASTJsonConverter.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-09-08 22:47:58 +0800
committerchriseth <c@ethdev.com>2015-09-08 22:47:58 +0800
commitea981cb0f5e5b131a56e420db97e944644ac95d6 (patch)
tree65c69f4586a48cc5e65c8ba5ded8848f02fd3b75 /libsolidity/ASTJsonConverter.cpp
parent667921243b7d1188d76812958b50b34ae6f8cae5 (diff)
parentdf8c82bc60f4d9238635082f9a9f41a45b5e2b98 (diff)
downloaddexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar.gz
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar.bz2
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar.lz
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar.xz
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.tar.zst
dexon-solidity-ea981cb0f5e5b131a56e420db97e944644ac95d6.zip
Merge pull request #41 from LianaHus/sol_rename_getters
solidity interface changes. removing get prefix
Diffstat (limited to 'libsolidity/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ASTJsonConverter.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/libsolidity/ASTJsonConverter.cpp b/libsolidity/ASTJsonConverter.cpp
index 122b1c0d..3d119a4e 100644
--- a/libsolidity/ASTJsonConverter.cpp
+++ b/libsolidity/ASTJsonConverter.cpp
@@ -90,19 +90,19 @@ Json::Value const& ASTJsonConverter::json()
bool ASTJsonConverter::visit(ImportDirective const& _node)
{
- addJsonNode("Import", { make_pair("file", _node.getIdentifier())});
+ addJsonNode("Import", { make_pair("file", _node.identifier())});
return true;
}
bool ASTJsonConverter::visit(ContractDefinition const& _node)
{
- addJsonNode("Contract", { make_pair("name", _node.getName()) }, true);
+ addJsonNode("Contract", { make_pair("name", _node.name()) }, true);
return true;
}
bool ASTJsonConverter::visit(StructDefinition const& _node)
{
- addJsonNode("Struct", { make_pair("name", _node.getName()) }, true);
+ addJsonNode("Struct", { make_pair("name", _node.name()) }, true);
return true;
}
@@ -115,7 +115,7 @@ bool ASTJsonConverter::visit(ParameterList const&)
bool ASTJsonConverter::visit(FunctionDefinition const& _node)
{
addJsonNode("Function",
- { make_pair("name", _node.getName()),
+ { make_pair("name", _node.name()),
make_pair("public", boost::lexical_cast<std::string>(_node.isPublic())),
make_pair("const", boost::lexical_cast<std::string>(_node.isDeclaredConst())) },
true);
@@ -124,7 +124,7 @@ bool ASTJsonConverter::visit(FunctionDefinition const& _node)
bool ASTJsonConverter::visit(VariableDeclaration const& _node)
{
- addJsonNode("VariableDeclaration", { make_pair("name", _node.getName()) }, true);
+ addJsonNode("VariableDeclaration", { make_pair("name", _node.name()) }, true);
return true;
}
@@ -135,13 +135,13 @@ bool ASTJsonConverter::visit(TypeName const&)
bool ASTJsonConverter::visit(ElementaryTypeName const& _node)
{
- addJsonNode("ElementaryTypeName", { make_pair("name", Token::toString(_node.getTypeName())) });
+ addJsonNode("ElementaryTypeName", { make_pair("name", Token::toString(_node.typeName())) });
return true;
}
bool ASTJsonConverter::visit(UserDefinedTypeName const& _node)
{
- addJsonNode("UserDefinedTypeName", { make_pair("name", _node.getName()) });
+ addJsonNode("UserDefinedTypeName", { make_pair("name", _node.name()) });
return true;
}
@@ -208,8 +208,8 @@ bool ASTJsonConverter::visit(ExpressionStatement const&)
bool ASTJsonConverter::visit(Assignment const& _node)
{
addJsonNode("Assignment",
- { make_pair("operator", Token::toString(_node.getAssignmentOperator())),
- make_pair("type", getType(_node)) },
+ { make_pair("operator", Token::toString(_node.assignmentOperator())),
+ 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,53 +237,53 @@ 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;
}
bool ASTJsonConverter::visit(MemberAccess const& _node)
{
addJsonNode("MemberAccess",
- { make_pair("member_name", _node.getMemberName()),
- make_pair("type", getType(_node)) },
+ { make_pair("member_name", _node.memberName()),
+ 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.getName()), 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.getTypeToken())), make_pair("type", getType(_node)) });
+ { make_pair("value", Token::toString(_node.typeToken())), make_pair("type", type(_node)) });
return true;
}
bool ASTJsonConverter::visit(Literal const& _node)
{
- char const* tokenString = Token::toString(_node.getToken());
+ char const* tokenString = Token::toString(_node.token());
addJsonNode("Literal",
{ make_pair("string", (tokenString) ? tokenString : "null"),
- make_pair("value", _node.getValue()),
- make_pair("type", getType(_node)) });
+ make_pair("value", _node.value()),
+ make_pair("type", type(_node)) });
return true;
}
@@ -428,9 +428,9 @@ void ASTJsonConverter::process()
processed = true;
}
-string ASTJsonConverter::getType(Expression const& _expression)
+string ASTJsonConverter::type(Expression const& _expression)
{
- return (_expression.getType()) ? _expression.getType()->toString() : "Unknown";
+ return (_expression.type()) ? _expression.type()->toString() : "Unknown";
}
}