vc4/asm/report.h
2025-09-06 02:01:16 +02:00

21 lines
454 B
C

#ifndef REPORT_H
#define REPORT_H
#include <stddef.h>
#include <stdio.h>
#define FMT_ERROR(FMT) "\x1b[1;91merror\x1b[1;97m: " FMT "\x1b[0m\n"
#define FMT_WARNING(FMT) "\x1b[1;93mwarning\x1b[1;97m: " FMT "\x1b[0m\n"
#define FMT_INFO(FMT) "\x1b[1;96minfo\x1b[1;97m: " FMT "\x1b[0m\n"
typedef struct {
const char* filename;
size_t idx;
int line;
int col;
} Loc;
void loc_pretty_print(Loc loc, const char* text, size_t text_len);
#endif