diff options
Refactoring: Check types outside of AST and recover from some errors.
Diffstat (limited to 'libsolidity/ASTJsonConverter.cpp')
-rw-r--r-- | libsolidity/ASTJsonConverter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libsolidity/ASTJsonConverter.cpp b/libsolidity/ASTJsonConverter.cpp index 96e5cf2a..3edcb77e 100644 --- a/libsolidity/ASTJsonConverter.cpp +++ b/libsolidity/ASTJsonConverter.cpp @@ -232,19 +232,19 @@ bool ASTJsonConverter::visit(UnaryOperation const& _node) bool ASTJsonConverter::visit(BinaryOperation const& _node) { - addJsonNode("BinaryOperation", - { make_pair("operator", Token::toString(_node.getOperator())), - make_pair("type", type(_node))}, - true); + addJsonNode("BinaryOperation", { + make_pair("operator", Token::toString(_node.getOperator())), + make_pair("type", type(_node)) + }, true); return true; } bool ASTJsonConverter::visit(FunctionCall const& _node) { - addJsonNode("FunctionCall", - { make_pair("type_conversion", boost::lexical_cast<std::string>(_node.isTypeConversion())), - make_pair("type", type(_node)) }, - true); + addJsonNode("FunctionCall", { + make_pair("type_conversion", boost::lexical_cast<std::string>(_node.annotation().isTypeConversion)), + make_pair("type", type(_node)) + }, true); return true; } @@ -441,7 +441,7 @@ void ASTJsonConverter::process() string ASTJsonConverter::type(Expression const& _expression) { - return (_expression.type()) ? _expression.type()->toString() : "Unknown"; + return _expression.annotation().type ? _expression.annotation().type->toString() : "Unknown"; } } |