From ec29bfb9563bcec1cc2a054cc2c1942fd5c65cb1 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Wed, 2 Feb 2022 03:03:01 -0500 Subject: Add support for pointers! (tests missing) This commit adds initial support for taking pointers / dereferencing. The type system is still a bit of a hot mess, so all type information is actually not looked at, but the functionality still seems to be there. Still need to add some tests for pointers/dereferencing to ensure that it works in some edge cases as well. --- src/ast.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ast.h') diff --git a/src/ast.h b/src/ast.h index 287f51b..0966550 100644 --- a/src/ast.h +++ b/src/ast.h @@ -9,7 +9,8 @@ F(OP_BWINV, "~") \ F(OP_PLUS, "+") \ F(OP_MINUS, "-") \ - F(OP_ADDROF, "&") \ + F(OP_ADDROF, "&") \ + F(OP_DEREF, "*") \ F(OP_MUL, "*") \ F(OP_DIV, "/") \ F(OP_MOD, "%") \ -- cgit v1.2.3