Remove CharStream from SourceLocation.

This commit is contained in:
chriseth
2021-07-14 15:12:07 +02:00
parent 57d32ca252
commit f75b55071e
73 changed files with 613 additions and 560 deletions
@@ -41,6 +41,7 @@
#include <liblangutil/ErrorReporter.h>
#include <liblangutil/Scanner.h>
#include <liblangutil/SourceReferenceFormatter.h>
#include <liblangutil/CharStreamProvider.h>
#include <libsolidity/interface/OptimiserSettings.h>
@@ -106,7 +107,7 @@ Object EVMToEwasmTranslator::run(Object const& _object)
message += ret.toString(&WasmDialect::instance());
message += "----------------------------------\n";
for (auto const& err: errors)
message += langutil::SourceReferenceFormatter::formatErrorInformation(*err);
message += langutil::SourceReferenceFormatter::formatErrorInformation(*err, m_charStreamProvider);
yulAssert(false, message);
}
@@ -140,7 +141,10 @@ void EVMToEwasmTranslator::parsePolyfill()
{
string message;
for (auto const& err: errors)
message += langutil::SourceReferenceFormatter::formatErrorInformation(*err);
message += langutil::SourceReferenceFormatter::formatErrorInformation(
*err,
SingletonCharStreamProvider(*scanner->charStream())
);
yulAssert(false, message);
}