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/Token.h>
|
||||||
#include <liblangutil/CharStream.h>
|
#include <liblangutil/CharStream.h>
|
||||||
#include <liblangutil/SourceLocation.h>
|
#include <liblangutil/SourceLocation.h>
|
||||||
#include <libsolutil/Common.h>
|
|
||||||
#include <libsolutil/CommonData.h>
|
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include <liblangutil/SourceReferenceFormatter.h>
|
#include <liblangutil/SourceReferenceFormatter.h>
|
||||||
#include <liblangutil/Exceptions.h>
|
#include <liblangutil/Exceptions.h>
|
||||||
|
#include <liblangutil/CharStream.h>
|
||||||
|
#include <liblangutil/CharStreamProvider.h>
|
||||||
#include <libsolutil/UTF8.h>
|
#include <libsolutil/UTF8.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string_view>
|
#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
|
AnsiColorized SourceReferenceFormatter::normalColored() const
|
||||||
{
|
{
|
||||||
return AnsiColorized(m_stream, m_colored, {WHITE});
|
return AnsiColorized(m_stream, m_colored, {WHITE});
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include <liblangutil/Exceptions.h>
|
#include <liblangutil/Exceptions.h>
|
||||||
#include <liblangutil/SourceReferenceExtractor.h>
|
#include <liblangutil/SourceReferenceExtractor.h>
|
||||||
#include <liblangutil/CharStreamProvider.h>
|
|
||||||
|
|
||||||
#include <libsolutil/AnsiColorized.h>
|
#include <libsolutil/AnsiColorized.h>
|
||||||
|
|
||||||
@ -33,6 +32,9 @@
|
|||||||
|
|
||||||
namespace solidity::langutil
|
namespace solidity::langutil
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class CharStream;
|
||||||
|
class CharStreamProvider;
|
||||||
struct SourceLocation;
|
struct SourceLocation;
|
||||||
|
|
||||||
class SourceReferenceFormatter
|
class SourceReferenceFormatter
|
||||||
@ -80,13 +82,7 @@ public:
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string formatErrorInformation(Error const& _error, CharStream const& _charStream)
|
static std::string formatErrorInformation(Error const& _error, CharStream const& _charStream);
|
||||||
{
|
|
||||||
return formatErrorInformation(
|
|
||||||
_error,
|
|
||||||
SingletonCharStreamProvider(_charStream)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
util::AnsiColorized normalColored() const;
|
util::AnsiColorized normalColored() const;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <liblangutil/Scanner.h>
|
#include <liblangutil/Scanner.h>
|
||||||
#include <liblangutil/ParserBase.h>
|
#include <liblangutil/ParserBase.h>
|
||||||
|
|
||||||
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <libyul/optimiser/ReasoningBasedSimplifier.h>
|
#include <libyul/optimiser/ReasoningBasedSimplifier.h>
|
||||||
#include <libyul/AsmPrinter.h>
|
#include <libyul/AsmPrinter.h>
|
||||||
|
|
||||||
|
#include <liblangutil/CharStreamProvider.h>
|
||||||
#include <liblangutil/SourceReferenceFormatter.h>
|
#include <liblangutil/SourceReferenceFormatter.h>
|
||||||
#include <liblangutil/Scanner.h>
|
#include <liblangutil/Scanner.h>
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <tools/yulPhaser/SimulationRNG.h>
|
#include <tools/yulPhaser/SimulationRNG.h>
|
||||||
|
|
||||||
#include <liblangutil/CharStream.h>
|
#include <liblangutil/CharStream.h>
|
||||||
|
#include <liblangutil/CharStreamProvider.h>
|
||||||
#include <liblangutil/SourceReferenceFormatter.h>
|
#include <liblangutil/SourceReferenceFormatter.h>
|
||||||
#include <liblangutil/Scanner.h>
|
#include <liblangutil/Scanner.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user