Made for Lang Jam (
jam0001
) theme: first-class comments in 48 hours.
UPDATE: regretti won Lang Jam (
jam0001
)!
What if all those "TODO:
" comments and beautiful ASCII art diagrams in your code actually worked? Presenting you the one and only regretti, write your spaghetti and forgetti!
Basically, I took the theme "literally"!
So comments are commands!
You can only run instruction statements inside a comment! 💬
NOTE: Please run on Linux.
$ git clone https://github.com/mufeedvh/regretti.git
$ cd regretti/
$ cargo build --release
$ ./target/release/regretti
Lo and behold!
main:
/*
+----------------------+
| print "Hello World!" |
+----------------------+
*/
Loops
main:
let count = 69420
/*
+--------+
| loop 5 |<----------+
+--------+ |
| v
| +-------------+
| | print count |
| +-------------+
| ^
| |
+---------------+
*/
:end
Get more examples below!
Examples are the best way to learn regretti, these cover all the features and functionalities of the language:
All other examples have not been completely implemented yet.
Also I am pretty sure there are a lot of bugs, this is probably the most obscure syntax for parsing lol...
In a nutshell: