feat: add source-aware diagnostics
This commit is contained in:
@@ -12,10 +12,14 @@ typedef struct FeLoc {
|
|||||||
typedef struct FeDiags {
|
typedef struct FeDiags {
|
||||||
unsigned long errors;
|
unsigned long errors;
|
||||||
unsigned long warnings;
|
unsigned long warnings;
|
||||||
|
const char *source;
|
||||||
|
unsigned long source_len;
|
||||||
} FeDiags;
|
} 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_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_errorf(FeDiags *d, FeLoc loc, const char *msg, const char *arg);
|
||||||
void fe_diag_note(FeLoc loc, const char *msg);
|
void fe_diag_note(FeLoc loc, const char *msg);
|
||||||
|
void fe_diag_note_src(FeDiags *d, FeLoc loc, const char *msg);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user