You are browsing as a guest. Sign up (or log in) to start making projects!

5h 23m 28s logged

Devlog 8: We have language!

If you couldn’t tell, that was a play on “we have liftoff!”. I didn’t add a rocket emoji, for obvious reasons.

Anyway, I have great news: Ile is almost a usable language! Today, I added loops and operators, so it can iterate and do math now! My for loop is a tad different than other languages, so here’s the gist: every for loop has a condition and a block. Every iteration, the condition runs. If it returns something, the block runs. Otherwise, the loop exits. Because I made let statements return the value they assign, you can have syntax that looks like this:

for let x = iterator.next() {}

I’m really proud of how my syntax is turning out overall. There’s still not much to screenshot; I haven’t written the logic to interface with Rust, so there’s no println yet. I do have some more test coverage, though.

There was some difficulty getting break to work, however. For some reason, the loop it was a part of would always keep going. Eventually, I figured out why: It was being removed from the stack at the end of the code block that generated it. To fix this, I added some logic to re-push it to the stack if it got popped.

0
3

Comments 0

No comments yet. Be the first!