mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use Json::valueToQuotedString directly
This commit is contained in:
parent
cd22da1d9e
commit
eb33e76416
@ -23,7 +23,7 @@
|
|||||||
#include <libsolidity/ast/ASTPrinter.h>
|
#include <libsolidity/ast/ASTPrinter.h>
|
||||||
#include <libsolidity/ast/AST.h>
|
#include <libsolidity/ast/AST.h>
|
||||||
|
|
||||||
#include <libdevcore/JSON.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
#include <boost/algorithm/string/join.hpp>
|
#include <boost/algorithm/string/join.hpp>
|
||||||
|
|
||||||
@ -585,9 +585,7 @@ void ASTPrinter::printSourcePart(ASTNode const& _node)
|
|||||||
*m_ostream <<
|
*m_ostream <<
|
||||||
indentation() <<
|
indentation() <<
|
||||||
" Source: " <<
|
" Source: " <<
|
||||||
/// Note: this "abuses" the JSON library to print a string (as it is not a valid root node).
|
Json::valueToQuotedString(m_source.substr(location.start, location.end - location.start).c_str()) <<
|
||||||
/// It also makes a copy of the string.
|
|
||||||
jsonCompactPrint(m_source.substr(location.start, location.end - location.start)) <<
|
|
||||||
endl;
|
endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user