diff options
author | Christian <c@ethdev.com> | 2014-10-24 22:47:10 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-24 22:47:10 +0800 |
commit | 33babb0c6fab4ea6851720a633ad847793208b1a (patch) | |
tree | afda2073b82e2a3daa5e2c3ae26ca1d41df6658b /SourceReferenceFormatter.cpp | |
parent | f8038792cab8ed7ffb75b12d01cbe8f5a93555fc (diff) | |
download | dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.gz dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.bz2 dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.lz dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.xz dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.tar.zst dexon-solidity-33babb0c6fab4ea6851720a633ad847793208b1a.zip |
Use endl instead of "\n".
Diffstat (limited to 'SourceReferenceFormatter.cpp')
-rw-r--r-- | SourceReferenceFormatter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/SourceReferenceFormatter.cpp b/SourceReferenceFormatter.cpp index 665df32a..bc9e8f26 100644 --- a/SourceReferenceFormatter.cpp +++ b/SourceReferenceFormatter.cpp @@ -42,16 +42,16 @@ void SourceReferenceFormatter::printSourceLocation(std::ostream& _stream, std::tie(endLine, endColumn) = _scanner.translatePositionToLineColumn(_location.end); if (startLine == endLine) { - _stream << _scanner.getLineAtPosition(_location.start) << "\n" + _stream << _scanner.getLineAtPosition(_location.start) << std::endl << std::string(startColumn, ' ') << "^"; if (endColumn > startColumn + 2) _stream << std::string(endColumn - startColumn - 2, '-'); if (endColumn > startColumn + 1) _stream << "^"; - _stream << "\n"; + _stream << std::endl; } else - _stream << _scanner.getLineAtPosition(_location.start) << "\n" + _stream << _scanner.getLineAtPosition(_location.start) << std::endl << std::string(startColumn, ' ') << "^\n" << "Spanning multiple lines.\n"; } @@ -63,8 +63,8 @@ void SourceReferenceFormatter::printSourcePosition(std::ostream& _stream, int line; int column; std::tie(line, column) = _scanner.translatePositionToLineColumn(_position); - _stream << "at line " << (line + 1) << ", column " << (column + 1) << "\n" - << _scanner.getLineAtPosition(_position) << "\n" + _stream << "at line " << (line + 1) << ", column " << (column + 1) << std::endl + << _scanner.getLineAtPosition(_position) << std::endl << std::string(column, ' ') << "^" << std::endl; } |