c-compiler/src/errors.h

15 lines
283 B
C++

#ifndef ERRORS_H
#define ERRORS_H
#include <memory>
#include "tokens.h"
class CompileError : public std::runtime_error {
public:
token::Metadata m_meta;
CompileError(std::string text, token::Metadata meta)
: std::runtime_error{ text }, m_meta{ meta } {}
};
#endif