aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index 2d26ce8a..cfb13271 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -23,10 +23,11 @@
#include <boost/algorithm/string/join.hpp>
#include <libdevcore/UTF8.h>
#include <libsolidity/ast/AST.h>
-#include <libsolidity/inlineasm/AsmData.h>
-#include <libsolidity/inlineasm/AsmPrinter.h>
+#include <libyul/AsmData.h>
+#include <libyul/AsmPrinter.h>
using namespace std;
+using namespace langutil;
namespace dev
{
@@ -121,8 +122,8 @@ void ASTJsonConverter::setJsonNode(
string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location) const
{
int sourceIndex{-1};
- if (_location.sourceName && m_sourceIndices.count(*_location.sourceName))
- sourceIndex = m_sourceIndices.at(*_location.sourceName);
+ if (_location.source && m_sourceIndices.count(_location.source->name()))
+ sourceIndex = m_sourceIndices.at(_location.source->name());
int length = -1;
if (_location.start >= 0 && _location.end >= 0)
length = _location.end - _location.start;
@@ -171,7 +172,7 @@ void ASTJsonConverter::appendExpressionAttributes(
_attributes += exprAttributes;
}
-Json::Value ASTJsonConverter::inlineAssemblyIdentifierToJson(pair<assembly::Identifier const* ,InlineAssemblyAnnotation::ExternalIdentifierInfo> _info) const
+Json::Value ASTJsonConverter::inlineAssemblyIdentifierToJson(pair<yul::Identifier const* ,InlineAssemblyAnnotation::ExternalIdentifierInfo> _info) const
{
Json::Value tuple(Json::objectValue);
tuple["src"] = sourceLocationToString(_info.first->location);
@@ -464,7 +465,7 @@ bool ASTJsonConverter::visit(InlineAssembly const& _node)
}
}
setJsonNode(_node, "InlineAssembly", {
- make_pair("operations", Json::Value(assembly::AsmPrinter()(_node.operations()))),
+ make_pair("operations", Json::Value(yul::AsmPrinter()(_node.operations()))),
make_pair("externalReferences", std::move(externalReferences))
});
return false;