feat: add source-aware diagnostics

This commit is contained in:
정시원
2026-08-16 14:01:51 +09:00
parent 6acfc5918d
commit c06bb9aa1c
+4
View File
@@ -12,10 +12,14 @@ typedef struct FeLoc {
typedef struct FeDiags {
unsigned long errors;
unsigned long warnings;
const char *source;
unsigned long source_len;
} FeDiags;
void fe_diags_init(FeDiags *d, const char *source, unsigned long source_len);
void fe_diag_error(FeDiags *d, FeLoc loc, const char *msg);
void fe_diag_errorf(FeDiags *d, FeLoc loc, const char *msg, const char *arg);
void fe_diag_note(FeLoc loc, const char *msg);
void fe_diag_note_src(FeDiags *d, FeLoc loc, const char *msg);
#endif