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
+2 -9
View File
@@ -69,7 +69,8 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
if (!stack.parseAndAnalyze("source", m_source))
{
AnsiColorized(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Error parsing source." << endl;
printErrors(_stream, stack.errors());
SourceReferenceFormatter{_stream, stack, true, false}
.printErrorInformation(stack.errors());
return TestResult::FatalError;
}
stack.optimize();
@@ -104,11 +105,3 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
return checkResult(_stream, _linePrefix, _formatted);
}
void ObjectCompilerTest::printErrors(ostream& _stream, ErrorList const& _errors)
{
SourceReferenceFormatter formatter(_stream, true, false);
for (auto const& error: _errors)
formatter.printErrorInformation(*error);
}