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
+3 -4
View File
@@ -561,7 +561,7 @@ bool CommandLineInterface::compile()
m_compiler = make_unique<CompilerStack>(m_fileReader.reader());
SourceReferenceFormatter formatter(serr(false), coloredOutput(m_options), m_options.formatting.withErrorIds);
SourceReferenceFormatter formatter(serr(false), *m_compiler, coloredOutput(m_options), m_options.formatting.withErrorIds);
try
{
@@ -598,8 +598,7 @@ bool CommandLineInterface::compile()
if (!m_compiler->analyze())
{
for (auto const& error: m_compiler->errors())
formatter.printErrorInformation(*error);
formatter.printErrorInformation(m_compiler->errors());
astAssert(false, "Analysis of the AST failed");
}
}
@@ -974,7 +973,7 @@ bool CommandLineInterface::assemble(
for (auto const& sourceAndStack: assemblyStacks)
{
auto const& stack = sourceAndStack.second;
SourceReferenceFormatter formatter(serr(false), coloredOutput(m_options), m_options.formatting.withErrorIds);
SourceReferenceFormatter formatter(serr(false), stack, coloredOutput(m_options), m_options.formatting.withErrorIds);
for (auto const& error: stack.errors())
{