#pragma once #include #include 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