Expand C tokens and parser expression support
This commit is contained in:
15
base.c
15
base.c
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user