From 4c3b2fec322feb8afd23703866d81f1dda51b6ae Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 11 Feb 2023 09:41:54 -0800 Subject: Add a bytecode interpreter. I wrote it in C because I actually like programming in C. Turns out setting up a Makefile is really easy too. --- bytecode/panic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bytecode/panic.c (limited to 'bytecode/panic.c') diff --git a/bytecode/panic.c b/bytecode/panic.c new file mode 100644 index 0000000..db2b6f8 --- /dev/null +++ b/bytecode/panic.c @@ -0,0 +1,15 @@ +#include +#include +#include + +#include "panic.h" + +void panicf(const char *format, ...) +{ + va_list ap; + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); + + exit(1); +} -- cgit v1.3.1