From 1422d647cddb577fafc19ee97e33a394aefc560b Mon Sep 17 00:00:00 2001 From: Elias Haugsbakk Date: Sun, 20 Sep 2026 03:12:03 +0200 Subject: add rules to semantics analyzer --- docs/example_IR | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/example_IR') 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) + -- cgit v1.2.3