Groundwork. Prepare for automatic tagging of errors in parser-based classes

[Not compilable until the next commit]
This commit is contained in:
a3d4
2020-05-09 01:03:02 +02:00
parent 4e58c672bb
commit 6965f199fd
2 changed files with 16 additions and 15 deletions
+6 -5
View File
@@ -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