feat: implement M1 Ferro frontend

This commit is contained in:
2026-08-16 07:10:53 +09:00
parent 990068f424
commit 005056a5ea
32 changed files with 986 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "diag.h"
void fe_diag_error(FeDiags *d, FeLoc loc, const char *msg)
{
d->errors++;
fprintf(stderr, "%s:%lu:%lu: error: %s\n", loc.file ? loc.file : "<source>", loc.line, loc.col, msg);
}
void fe_diag_errorf(FeDiags *d, FeLoc loc, const char *msg, const char *arg)
{
d->errors++;
fprintf(stderr, "%s:%lu:%lu: error: ", loc.file ? loc.file : "<source>", loc.line, loc.col);
fprintf(stderr, msg, arg);
fputc('\n', stderr);
}
void fe_diag_note(FeLoc loc, const char *msg)
{
fprintf(stderr, "%s:%lu:%lu: note: %s\n", loc.file ? loc.file : "<source>", loc.line, loc.col, msg);
}