From 1a165b3fcdabf7462a8f86eab5a6274f92ce9653 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Thu, 3 Feb 2022 04:38:35 -0500 Subject: Add helper to create builtins for syscalls + implement `read()` This was possible, but very tedious to do by hand before. Now we automate it based on the number of arguments. Note that currently we can't just add `syscall3()` etc as builtins because the actual numbers for the system calls vary from one system to another, and we want to maintain support for macOS and Linux (at least for now). --- src/types.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/types.c') diff --git a/src/types.c b/src/types.c index 7a055fe..6c7c0e5 100644 --- a/src/types.c +++ b/src/types.c @@ -95,6 +95,7 @@ static char *data_type_to_str(DataType type) case TYPE_PTR: return "*"; case TYPE_ARRAY: return "array"; case TYPE_CHAR: return "char"; + case TYPE_ANY: return "<@>"; default: assert(false && "Unreachable"); } } -- cgit v1.2.3