skopy/lib/include/errors.h

31 lines
486 B
C

#ifndef SK_ERROR_H
#define SK_ERROR_H
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <vec.h>
#include <str.h>
struct error
{
int line;
char* msg;
};
extern struct vec* errors;
void errors_init();
void errors_free();
void errors_push(int line, char const* format, ...);
bool errors_ok();
void errors_dump();
void error_init(struct error* self, int line, char* msg);
void error_free(struct error* self);
#endif