liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge

This commit is contained in:
Christian Parpart
2018-12-06 14:01:01 +01:00
committed by chriseth
parent 6efe2a5266
commit 073b03d90c
16 changed files with 234 additions and 126 deletions
+1 -2
View File
@@ -386,8 +386,7 @@ void CompilerContext::appendInlineAssembly(
for (auto const& error: errorReporter.errors())
message += SourceReferenceFormatter::formatExceptionInformation(
*error,
(error->type() == Error::Type::Warning) ? "Warning" : "Error",
[&](string const&) -> Scanner const& { return *scanner; }
(error->type() == Error::Type::Warning) ? "Warning" : "Error"
);
message += "-------------------------------------------\n";