mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Groundwork. Prepare for automatic tagging of errors in parser-based classes
[Not compilable until the next commit]
This commit is contained in:
@@ -32,6 +32,7 @@ namespace solidity::langutil
|
||||
|
||||
class ErrorReporter;
|
||||
class Scanner;
|
||||
struct ErrorId;
|
||||
|
||||
class ParserBase
|
||||
{
|
||||
@@ -88,17 +89,17 @@ protected:
|
||||
|
||||
/// Creates a @ref ParserError and annotates it with the current position and the
|
||||
/// given @a _description.
|
||||
void parserError(std::string const& _description);
|
||||
void parserError(SourceLocation const& _location, std::string const& _description);
|
||||
void parserError(ErrorId _error, std::string const& _description);
|
||||
void parserError(ErrorId _error, SourceLocation const& _location, std::string const& _description);
|
||||
|
||||
/// Creates a @ref ParserWarning and annotates it with the current position and the
|
||||
/// given @a _description.
|
||||
void parserWarning(std::string const& _description);
|
||||
void parserWarning(ErrorId _error, std::string const& _description);
|
||||
|
||||
/// Creates a @ref ParserError and annotates it with the current position and the
|
||||
/// given @a _description. Throws the FatalError.
|
||||
void fatalParserError(std::string const& _description);
|
||||
void fatalParserError(SourceLocation const& _location, std::string const& _description);
|
||||
void fatalParserError(ErrorId _error, std::string const& _description);
|
||||
void fatalParserError(ErrorId _error, SourceLocation const& _location, std::string const& _description);
|
||||
|
||||
std::shared_ptr<Scanner> m_scanner;
|
||||
/// The reference to the list of errors and warning to add errors/warnings during parsing
|
||||
|
||||
Reference in New Issue
Block a user