Expand C tokens and parser expression support

This commit is contained in:
Krzosa Karol
2026-05-10 14:28:57 +02:00
parent 9792517c41
commit f0e5b6a273
5 changed files with 161 additions and 21 deletions

15
base.c
View File

@@ -1,3 +1,18 @@
#define panicf(...) base_panicf(__FILE__, __LINE__, __VA_ARGS__)
_Noreturn
void base_panicf(char *file, int line, const char *fmt, ...) {
fprintf(stderr, "%s:%d", file, line);
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
fprintf(stderr, "\n");
fflush(stderr);
fflush(stdout);
exit(1);
}
#define Vec(T) struct { T *data; int len; int cap; }
typedef Vec(void) VecVoid;