aboutsummaryrefslogtreecommitdiff
path: root/compiler/SomeClass.slul
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2025-07-06 16:46:27 +0200
committerSamuel Lidén Borell <samuel@kodafritt.se>2025-07-06 16:46:27 +0200
commitaf899015cecdef89c47e75c2846187d854507ab6 (patch)
treec3a88ad56461ca1bd9289a7b05f4a745fb8b08e2 /compiler/SomeClass.slul
parent9e1a79aff3c18c6c6b6c4db6116bd2dbab20ec52 (diff)
downloadslul-try2-main.tar.gz
slul-try2-main.tar.bz2
slul-try2-main.zip
bootstrap: Basic support for definitions of instance variablesHEADmain
Diffstat (limited to 'compiler/SomeClass.slul')
-rw-r--r--compiler/SomeClass.slul25
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler/SomeClass.slul b/compiler/SomeClass.slul
new file mode 100644
index 0000000..3adc49e
--- /dev/null
+++ b/compiler/SomeClass.slul
@@ -0,0 +1,25 @@
+# TODO ! for modifiable variables and for modifications
+unsigned n = 0
+bool b = false
+
+ignore
+func set_b
+ bool value
+code
+ # TODO access to instance variables
+ b = value
+end
+
+ignore
+func count
+returns
+ unsigned value
+code
+ if b
+ # TODO += and -= etc.
+ n = n + 1
+ else
+ n = n - 1
+ elif
+ return n
+end