24 lines
605 B
C++
24 lines
605 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;
|
|
void typeError(size_t line, size_t charPositionInLine, std::string_view msg);
|
|
};
|
|
|
|
} // namespace xlang
|