diff options
author | Christian <c@ethdev.com> | 2014-11-12 00:41:48 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-12 00:41:48 +0800 |
commit | 8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6 (patch) | |
tree | ba26de04d610fcc09c96f366a35bb148180a4e21 /ASTPrinter.cpp | |
parent | a0c72065fee89c4558eeb4a98e5273633635bc39 (diff) | |
download | dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar.gz dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar.bz2 dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar.lz dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar.xz dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.tar.zst dexon-solidity-8c6bf21c01d3ae3c22301bbe0b039aa18e1f58a6.zip |
Provide interface for calls in JSON and some other formatting changes.
Diffstat (limited to 'ASTPrinter.cpp')
-rw-r--r-- | ASTPrinter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ASTPrinter.cpp b/ASTPrinter.cpp index eb9d92f0..987ad11c 100644 --- a/ASTPrinter.cpp +++ b/ASTPrinter.cpp @@ -30,8 +30,8 @@ namespace dev namespace solidity { -ASTPrinter::ASTPrinter(ASTPointer<ASTNode> const& _ast, string const& _source): - m_indentation(0), m_source(_source), m_ast(_ast) +ASTPrinter::ASTPrinter(ASTNode& _ast, string const& _source): + m_indentation(0), m_source(_source), m_ast(&_ast) { } @@ -430,8 +430,8 @@ void ASTPrinter::printSourcePart(ASTNode const& _node) if (!m_source.empty()) { Location const& location(_node.getLocation()); - *m_ostream << getIndentation() << " Source: |" - << m_source.substr(location.start, location.end - location.start) << "|" << endl; + *m_ostream << getIndentation() << " Source: " + << escaped(m_source.substr(location.start, location.end - location.start), false) << endl; } } |