aboutsummaryrefslogtreecommitdiff
path: root/examples/pointer.sloth
diff options
context:
space:
mode:
authorCatDevz <codyquinn1122@gmail.com>2023-09-11 15:55:47 -0500
committerCatDevz <codyquinn1122@gmail.com>2023-09-11 15:55:47 -0500
commitd9d843c969ac17ede98ea6094455e42687af906d (patch)
tree045be3c87b6aff50b56a195cf25404390e29d1b7 /examples/pointer.sloth
parent7b67ab3d6fbc74c95f35b992286cb98492c8b433 (diff)
downloadsloth-d9d843c969ac17ede98ea6094455e42687af906d.tar.gz
Added parsing for pointers & made LLVM a feature
Diffstat (limited to 'examples/pointer.sloth')
-rw-r--r--examples/pointer.sloth5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/pointer.sloth b/examples/pointer.sloth
new file mode 100644
index 0000000..7d7ca10
--- /dev/null
+++ b/examples/pointer.sloth
@@ -0,0 +1,5 @@
+fn main() Int {
+ val x: Int = 0;
+ val xPtr: Int = *x;
+ val x: Int = @xPtr;
+} \ No newline at end of file