22 lines
524 B
C++
22 lines
524 B
C++
#pragma once
|
|
|
|
#include <BaseErrorListener.h>
|
|
#include <string_view>
|
|
|
|
namespace xlang {
|
|
|
|
class ErrorListener : public antlr4::BaseErrorListener {
|
|
std::string_view file;
|
|
bool has_error;
|
|
|
|
public:
|
|
ErrorListener(std::string_view inputfile);
|
|
bool hasError();
|
|
void syntaxError(antlr4::Recognizer *recognizer,
|
|
antlr4::Token *offendingSymbol, size_t line,
|
|
size_t charPositionInLine, const std::string &msg,
|
|
std::exception_ptr e) override;
|
|
};
|
|
|
|
} // namespace xlang
|