From c06bb9aa1c34f75a64f3fac914d656f0317a5537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=8B=9C=EC=9B=90?= Date: Sun, 16 Aug 2026 14:01:51 +0900 Subject: [PATCH] feat: add source-aware diagnostics --- fec/src/diag.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fec/src/diag.h b/fec/src/diag.h index 6211e84..300f90f 100644 --- a/fec/src/diag.h +++ b/fec/src/diag.h @@ -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