From 073b03d90c8f0648ba135f0b30d8e72fd871478f Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Fri, 30 Nov 2018 14:34:08 +0100 Subject: liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge --- test/tools/yulopti.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/tools') diff --git a/test/tools/yulopti.cpp b/test/tools/yulopti.cpp index e867f049..9b3f6119 100644 --- a/test/tools/yulopti.cpp +++ b/test/tools/yulopti.cpp @@ -67,9 +67,9 @@ namespace po = boost::program_options; class YulOpti { public: - void printErrors(Scanner const& _scanner) + void printErrors() { - SourceReferenceFormatter formatter(cout, [&](string const&) -> Scanner const& { return _scanner; }); + SourceReferenceFormatter formatter(cout); for (auto const& error: m_errors) formatter.printExceptionInformation( @@ -86,7 +86,7 @@ public: if (!m_ast || !errorReporter.errors().empty()) { cout << "Error parsing source." << endl; - printErrors(*scanner); + printErrors(); return false; } m_analysisInfo = make_shared(); @@ -100,7 +100,7 @@ public: if (!analyzer.analyze(*m_ast) || !errorReporter.errors().empty()) { cout << "Error analyzing source." << endl; - printErrors(*scanner); + printErrors(); return false; } return true; -- cgit