diff options
author | Christian Parpart <christian@ethereum.org> | 2018-11-29 08:58:15 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2018-12-01 00:07:17 +0800 |
commit | 435f7b3b72157e884344adbc7b62033bd08bb51c (patch) | |
tree | de4831bb56b16945894b9efc0bea95576b43cea9 /libsolidity/interface/CompilerStack.cpp | |
parent | c48a5264be4221873fe02cac57f6a41a32010fea (diff) | |
download | dexon-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.cpp | 4 |
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); } } |