commit 70df24632c5c680d8a28573b70124bf8349b3ff6
parent 499b2ff90e63d0b9214b4dc23eb32667ab412165
Author: citbl <citbl@citbl.org>
Date: Mon, 27 Oct 2025 21:36:52 +1000
todos
Diffstat:
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/TODO b/TODO
@@ -1,11 +1,14 @@
@next
[x] variables, string first, so that we can print its content;
-[-] conditionals
-[-] loops
-[-] print anything else than a string
-[-] call another function from main, that prints something, handle return see todo
-[-] call another function that prints the passed argument
+[x] conditionals (basic)
+[x] loops (basic)
+[ ] handle for loop with `i = i + 1` and `i += 1` (see ex-for-simple2 and TODO NODE_BINARY_EXPR)
+[ ] printing `-5` crashes, I think parsing is wrong for `-`, sees as value 5
+[ ] print allow format or more than 1 arg
+[ ] print anything else than a string
+[ ] call another function from main, that prints something, handle return see todo
+[ ] call another function that prints the passed argument
@later
@@ -16,4 +19,3 @@
[x] redo arguments as list and not linked list, handle in parse and in gen (2 places in gen?)
[x] get rid of count_args and search for 'argc'
-[ ] printing -5 crashes, I think parsing is wrong for `-`, sees as value 5
diff --git a/ex-for-simple2.ox b/ex-for-simple2.ox
@@ -0,0 +1,6 @@
+void main() {
+ int i = 0;
+ for(i = 0; i < 5; i == i + 1) {
+ print("bozo!");
+ }
+}