aboutsummaryrefslogtreecommitdiffstats
path: root/liblangutil/SourceReferenceFormatter.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-12-01 06:45:31 +0800
committerGitHub <noreply@github.com>2018-12-01 06:45:31 +0800
commitaaeb74f59283486ee95d71f896cf2dd6cbe503f7 (patch)
tree062fbcc8d84ce2bfa5bb0bb2ef200ba402bb3e8b /liblangutil/SourceReferenceFormatter.cpp
parentcc00d8172b6cd7f9fc032e4a21857455ace2f290 (diff)
parent757623e381aba24b81a2365cf19037d3d96bf945 (diff)
downloaddexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.tar.gz
dexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.tar.zst
dexon-solidity-aaeb74f59283486ee95d71f896cf2dd6cbe503f7.zip
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
[1/3] SourceLocation related refactoring.
Diffstat (limited to 'liblangutil/SourceReferenceFormatter.cpp')
-rw-r--r--liblangutil/SourceReferenceFormatter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/liblangutil/SourceReferenceFormatter.cpp b/liblangutil/SourceReferenceFormatter.cpp
index 58a65521..8ac05b4e 100644
--- a/liblangutil/SourceReferenceFormatter.cpp
+++ b/liblangutil/SourceReferenceFormatter.cpp
@@ -30,9 +30,9 @@ using namespace langutil;
void SourceReferenceFormatter::printSourceLocation(SourceLocation const* _location)
{
- if (!_location || !_location->sourceName)
+ if (!_location || !_location->source)
return; // Nothing we can print here
- auto const& scanner = m_scannerFromSourceName(*_location->sourceName);
+ auto const& scanner = m_scannerFromSourceName(_location->source->name());
int startLine;
int startColumn;
tie(startLine, startColumn) = scanner.translatePositionToLineColumn(_location->start);
@@ -89,13 +89,13 @@ void SourceReferenceFormatter::printSourceLocation(SourceLocation const* _locati
void SourceReferenceFormatter::printSourceName(SourceLocation const* _location)
{
- if (!_location || !_location->sourceName)
+ if (!_location || !_location->source)
return; // Nothing we can print here
- auto const& scanner = m_scannerFromSourceName(*_location->sourceName);
+ auto const& scanner = m_scannerFromSourceName(_location->source->name());
int startLine;
int startColumn;
tie(startLine, startColumn) = scanner.translatePositionToLineColumn(_location->start);
- m_stream << *_location->sourceName << ":" << (startLine + 1) << ":" << (startColumn + 1) << ": ";
+ m_stream << _location->source->name() << ":" << (startLine + 1) << ":" << (startColumn + 1) << ": ";
}
void SourceReferenceFormatter::printExceptionInformation(