aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-02 03:03:01 -0500
committerMustafa Quraish <[email protected]>2022-02-02 03:03:01 -0500
commitec29bfb9563bcec1cc2a054cc2c1942fd5c65cb1 (patch)
tree7911b1e6fe12c4154656ed4915e5be7c95729707 /src/ast.h
parentRefactor variable access+assignment in terms of `generate_lvalue()` (diff)
downloadcup-ec29bfb9563bcec1cc2a054cc2c1942fd5c65cb1.tar.xz
cup-ec29bfb9563bcec1cc2a054cc2c1942fd5c65cb1.zip
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.
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h3
1 files changed, 2 insertions, 1 deletions
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, "%") \