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.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index 2a388bb..4d4eb9b 100644 --- a/src/ast.c +++ b/src/ast.c @@ -140,6 +140,7 @@ bool is_lvalue(NodeType type) { case AST_LOCAL_VAR: case AST_GLOBAL_VAR: + case OP_DEREF: // FIXME: Should this be the case? return true; default: return false; } -- cgit v1.2.3