Commit Graph

14 Commits

Author SHA1 Message Date
r4
d7860fdac0 add VM 2021-12-22 17:23:24 +01:00
r4
5dd15ce9f1 add builtin functions 2021-12-22 16:09:52 +01:00
r4
41a5dba208 replace malloc with xmalloc 2021-12-22 13:10:00 +01:00
r4
b80e5a9c4e formatting 2021-12-22 12:57:14 +01:00
r4
e7f4773cba make while loop parsing more elegant
It is now possible to parse parts of the program and save the IR for
later addition. This is currently used for while loops but will also make other
control flow elements easier to implement in the future.
2021-12-22 12:52:16 +01:00
r4
a8be4540b1 fix segfault
So basically, I used i++ on a linked list instead of i->next. As if that
wasn't bad enough on its own, it even managed to somehow still work in the 2
test scenarios I gave it. Regardless, it is now fixed.
2021-12-21 18:38:52 +01:00
r4
9f339ed44d make while loops more efficient and improve expression parsing 2021-12-21 17:09:03 +01:00
r4
10d436107c very basic while loop 2021-12-21 15:02:53 +01:00
r4
61d5661b96 fix memory leak on error 2021-12-21 14:04:50 +01:00
r4
005309d1eb IR jmp and scopes 2021-12-21 13:59:08 +01:00
r4
6080901842 catch missing expression 2021-12-21 11:55:53 +01:00
r4
63af3e907b add assignment operator and unify memory pools
The unification of memory pools also fixed some memory leaks and
hopefully reduced the mallocs of identifier strings significantly by
giving them the same pool as the token stream.
2021-12-21 11:40:49 +01:00
r4
21694f98ac init 2021-12-21 01:18:22 +01:00
r4
ab1887c28d Initial commit 2021-12-21 01:16:55 +01:00