diff options
author | Gav Wood <g@ethdev.com> | 2014-10-25 01:17:08 +0800 |
---|---|---|
committer | Gav Wood <g@ethdev.com> | 2014-10-25 01:17:08 +0800 |
commit | c6e0f82d2ebcbb77a24a287767d81674f78c62d7 (patch) | |
tree | 508c872a937f13b9a2900bf39181c7833793ee84 /ASTPrinter.cpp | |
parent | 987f42aa38bd51b612436425af4f4a0fdf0416c4 (diff) | |
parent | 2a24c3d8109d34cea6e47de77f519565e42c60fe (diff) | |
download | dexon-solidity-c6e0f82d2ebcbb77a24a287767d81674f78c62d7.tar.gz dexon-solidity-c6e0f82d2ebcbb77a24a287767d81674f78c62d7.tar.zst dexon-solidity-c6e0f82d2ebcbb77a24a287767d81674f78c62d7.zip |
Merge pull request #410 from chriseth/sol_exceptions
Improved exceptions and reporting exceptions for command-line compiler.
Diffstat (limited to 'ASTPrinter.cpp')
-rw-r--r-- | ASTPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ASTPrinter.cpp b/ASTPrinter.cpp index 06608800..44245ed4 100644 --- a/ASTPrinter.cpp +++ b/ASTPrinter.cpp @@ -253,7 +253,7 @@ bool ASTPrinter::visit(ElementaryTypeNameExpression& _node) bool ASTPrinter::visit(Literal& _node) { char const* tokenString = Token::toString(_node.getToken()); - if (tokenString == nullptr) + if (!tokenString) tokenString = "[no token]"; writeLine(std::string("Literal, token: ") + tokenString + " value: " + _node.getValue()); printType(_node); @@ -417,7 +417,7 @@ void ASTPrinter::printSourcePart(ASTNode const& _node) { Location const& location(_node.getLocation()); *m_ostream << getIndentation() << " Source: |" - << m_source.substr(location.start, location.end - location.start) << "|\n"; + << m_source.substr(location.start, location.end - location.start) << "|" << std::endl; } } @@ -436,7 +436,7 @@ std::string ASTPrinter::getIndentation() const void ASTPrinter::writeLine(std::string const& _line) { - *m_ostream << getIndentation() << _line << '\n'; + *m_ostream << getIndentation() << _line << std::endl; } } |