summaryrefslogtreecommitdiff
path: root/docs/example_IR
diff options
context:
space:
mode:
authorElias Haugsbakk <[email protected]>2026-09-20 03:12:03 +0200
committerElias Haugsbakk <[email protected]>2026-09-20 03:12:03 +0200
commit1422d647cddb577fafc19ee97e33a394aefc560b (patch)
treeec993727b3eef658c59c1bc0bb92abf5badcbbd2 /docs/example_IR
parent561d9e45bff6c36d2580259c8fe05a2f4ec756dd (diff)
add rules to semantics analyzer
Diffstat (limited to 'docs/example_IR')
-rw-r--r--docs/example_IR18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/example_IR b/docs/example_IR
index e492c21..3a20feb 100644
--- a/docs/example_IR
+++ b/docs/example_IR
@@ -1,3 +1,21 @@
# v0.0.1
str1 = "Hello World"
skriv(str1)
+
+# v0.0.2
+# support for arithmetic operators:
+# + plus
+# - minus
+# * multiplications
+# / division
+# % modulo
+# ** exponential
+
+# (1 + 2) * 3
+t0 = 1
+t1 = 2
+t2 = int1 + int 2
+t3 = 3
+t4 = t2 * t3
+skriv(int3)
+