aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.cpp
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-28 23:13:36 +0800
committerChristian Parpart <christian@ethereum.org>2018-11-29 19:45:27 +0800
commit22eff22492b2d569fe56b59763ddc1cd1cf9ccf4 (patch)
treeea6dc0a75a3c1c7d189ec9bb899884cc4f3eefd6 /libsolidity/interface/CompilerStack.cpp
parent6060a3682c077d7b329ec9171abdacbf1b383ec7 (diff)
downloaddexon-solidity-22eff22492b2d569fe56b59763ddc1cd1cf9ccf4.tar.gz
dexon-solidity-22eff22492b2d569fe56b59763ddc1cd1cf9ccf4.tar.zst
dexon-solidity-22eff22492b2d569fe56b59763ddc1cd1cf9ccf4.zip
liblangutil: extends CharStream to know about the respective (file-)name (and adapt codebase to it)
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 de4a7ec2..cc5a2102 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);
+ m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content, _name), _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);
+ m_sources[newPath].scanner = make_shared<Scanner>(CharStream(newContents, newPath), newPath);
sourcesToParse.push_back(newPath);
}
}