mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
This commit is contained in:
@@ -122,8 +122,8 @@ void ASTJsonConverter::setJsonNode(
|
||||
string ASTJsonConverter::sourceLocationToString(SourceLocation const& _location) const
|
||||
{
|
||||
int sourceIndex{-1};
|
||||
if (_location.sourceName && m_sourceIndices.count(*_location.sourceName))
|
||||
sourceIndex = m_sourceIndices.at(*_location.sourceName);
|
||||
if (_location.source && m_sourceIndices.count(_location.source->name()))
|
||||
sourceIndex = m_sourceIndices.at(_location.source->name());
|
||||
int length = -1;
|
||||
if (_location.start >= 0 && _location.end >= 0)
|
||||
length = _location.end - _location.start;
|
||||
|
||||
Reference in New Issue
Block a user