crafting-interpreters/cclox_src/error_handler.hh

17 lines
372 B
C++

#ifndef ERROR_HANDLER_HH
#define ERROR_HANDLER_HH
#include "tokenizer.hh"
#include <string>
struct ErrorHandler {
ErrorHandler() : had_error{false} {};
void error(int line, const std::string &message);
void error(Token token, const std::string &message);
void report(int line, const std::string &where, const std::string &message);
bool had_error;
};
#endif