From 5b87ec6ef2b84f1d319e5376bcf9eedea9829d79 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sun, 30 Jan 2022 01:19:54 -0500 Subject: Rename `cup` directory to `src` --- src/utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/utils.h (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h new file mode 100644 index 0000000..dfc018c --- /dev/null +++ b/src/utils.h @@ -0,0 +1,12 @@ +#pragma once + +#include "common.h" +#include "tokens.h" + +void die(const char *fmt, ...); +void _die_location(char *file, int line, Location loc, const char *fmt, ...); + +i64 i64max(i64 a, i64 b); +i64 i64min(i64 a, i64 b); + +#define die_location(loc, ...) _die_location(__FILE__, __LINE__, loc, __VA_ARGS__) \ No newline at end of file -- cgit v1.2.3