mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Eliminate some unnecessary header inclusions in headers in Scanner.h and SourceReferenceFormatter.h
This commit is contained in:
parent
ac0c749a32
commit
af18b8afc2
@ -55,8 +55,6 @@
|
||||
#include <liblangutil/Token.h>
|
||||
#include <liblangutil/CharStream.h>
|
||||
#include <liblangutil/SourceLocation.h>
|
||||
#include <libsolutil/Common.h>
|
||||
#include <libsolutil/CommonData.h>
|
||||
|
||||
#include <optional>
|
||||
#include <iosfwd>
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/CharStream.h>
|
||||
#include <liblangutil/CharStreamProvider.h>
|
||||
#include <libsolutil/UTF8.h>
|
||||
#include <iomanip>
|
||||
#include <string_view>
|
||||
@ -45,6 +47,14 @@ std::string replaceNonTabs(std::string_view _utf8Input, char _filler)
|
||||
|
||||
}
|
||||
|
||||
std::string SourceReferenceFormatter::formatErrorInformation(Error const& _error, CharStream const& _charStream)
|
||||
{
|
||||
return formatErrorInformation(
|
||||
_error,
|
||||
SingletonCharStreamProvider(_charStream)
|
||||
);
|
||||
}
|
||||
|
||||
AnsiColorized SourceReferenceFormatter::normalColored() const
|
||||
{
|
||||
return AnsiColorized(m_stream, m_colored, {WHITE});
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include <liblangutil/Exceptions.h>
|
||||
#include <liblangutil/SourceReferenceExtractor.h>
|
||||
#include <liblangutil/CharStreamProvider.h>
|
||||
|
||||
#include <libsolutil/AnsiColorized.h>
|
||||
|
||||
@ -33,6 +32,9 @@
|
||||
|
||||
namespace solidity::langutil
|
||||
{
|
||||
|
||||
class CharStream;
|
||||
class CharStreamProvider;
|
||||
struct SourceLocation;
|
||||
|
||||
class SourceReferenceFormatter
|
||||
@ -80,13 +82,7 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
static std::string formatErrorInformation(Error const& _error, CharStream const& _charStream)
|
||||
{
|
||||
return formatErrorInformation(
|
||||
_error,
|
||||
SingletonCharStreamProvider(_charStream)
|
||||
);
|
||||
}
|
||||
static std::string formatErrorInformation(Error const& _error, CharStream const& _charStream);
|
||||
|
||||
private:
|
||||
util::AnsiColorized normalColored() const;
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <liblangutil/Scanner.h>
|
||||
#include <liblangutil/ParserBase.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <libyul/optimiser/ReasoningBasedSimplifier.h>
|
||||
#include <libyul/AsmPrinter.h>
|
||||
|
||||
#include <liblangutil/CharStreamProvider.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <tools/yulPhaser/SimulationRNG.h>
|
||||
|
||||
#include <liblangutil/CharStream.h>
|
||||
#include <liblangutil/CharStreamProvider.h>
|
||||
#include <liblangutil/SourceReferenceFormatter.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user