aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.cpp
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-29 08:58:15 +0800
committerChristian Parpart <christian@ethereum.org>2018-12-01 00:07:17 +0800
commit435f7b3b72157e884344adbc7b62033bd08bb51c (patch)
treede4831bb56b16945894b9efc0bea95576b43cea9 /libsolidity/interface/CompilerStack.cpp
parentc48a5264be4221873fe02cac57f6a41a32010fea (diff)
downloaddexon-solidity-435f7b3b72157e884344adbc7b62033bd08bb51c.tar.gz
dexon-solidity-435f7b3b72157e884344adbc7b62033bd08bb51c.tar.zst
dexon-solidity-435f7b3b72157e884344adbc7b62033bd08bb51c.zip
liblangutil: Scanner: remove superfluous sourceName field (it's in CharStream already)
Also, ParserBase::sourceName() was dead code. Eliminating it should increase test coverage (how sneaky) :-)
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r--libsolidity/interface/CompilerStack.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 58229379..534073f1 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -125,7 +125,7 @@ bool CompilerStack::addSource(string const& _name, string const& _content, bool
{
bool existed = m_sources.count(_name) != 0;
reset(true);
- m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content, _name), _name);
+ m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content, _name));
m_sources[_name].isLibrary = _isLibrary;
m_stackState = SourcesSet;
return existed;
@@ -160,7 +160,7 @@ bool CompilerStack::parse()
{
string const& newPath = newSource.first;
string const& newContents = newSource.second;
- m_sources[newPath].scanner = make_shared<Scanner>(CharStream(newContents, newPath), newPath);
+ m_sources[newPath].scanner = make_shared<Scanner>(CharStream(newContents, newPath));
sourcesToParse.push_back(newPath);
}
}