aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-29 22:51:37 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-29 22:51:37 +0800
commiteb33e76416c7e8091bd33365b8b0917a9146868b (patch)
tree734459cebb9b56636b9d38d2a0b1922ef4bc6f09 /libsolidity/ast
parentcd22da1d9e77a9a7b6fe3ecf5bd828977acc6282 (diff)
downloaddexon-solidity-eb33e76416c7e8091bd33365b8b0917a9146868b.tar.gz
dexon-solidity-eb33e76416c7e8091bd33365b8b0917a9146868b.tar.zst
dexon-solidity-eb33e76416c7e8091bd33365b8b0917a9146868b.zip
Use Json::valueToQuotedString directly
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/ASTPrinter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libsolidity/ast/ASTPrinter.cpp b/libsolidity/ast/ASTPrinter.cpp
index 09191433..81e6cc44 100644
--- a/libsolidity/ast/ASTPrinter.cpp
+++ b/libsolidity/ast/ASTPrinter.cpp
@@ -23,7 +23,7 @@
#include <libsolidity/ast/ASTPrinter.h>
#include <libsolidity/ast/AST.h>
-#include <libdevcore/JSON.h>
+#include <json/json.h>
#include <boost/algorithm/string/join.hpp>
@@ -585,9 +585,7 @@ void ASTPrinter::printSourcePart(ASTNode const& _node)
*m_ostream <<
indentation() <<
" Source: " <<
- /// Note: this "abuses" the JSON library to print a string (as it is not a valid root node).
- /// It also makes a copy of the string.
- jsonCompactPrint(m_source.substr(location.start, location.end - location.start)) <<
+ Json::valueToQuotedString(m_source.substr(location.start, location.end - location.start).c_str()) <<
endl;
}
}