Add shortcuts for formatting error information

This commit is contained in:
mingchuan
2019-04-10 18:44:45 +08:00
parent ef3a18999c
commit f1374066af
13 changed files with 34 additions and 55 deletions
+1 -4
View File
@@ -55,10 +55,7 @@ namespace
void printErrors(ErrorList const& _errors)
{
for (auto const& error: _errors)
SourceReferenceFormatter(cout).printExceptionInformation(
*error,
(error->type() == Error::Type::Warning) ? "Warning" : "Error"
);
SourceReferenceFormatter(cout).printErrorInformation(*error);
}
pair<shared_ptr<Block>, shared_ptr<AsmAnalysisInfo>> parse(string const& _source)