Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

pass statement #320

Closed Akuli closed 1 year ago

Akuli commented 1 year ago

Sometimes it's useful to have a "do nothing" statement, like a pass statement in Python. In Jou I used this:

https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/self_hosted/tokenizer.jou#L315-L317

And for a function that does nothing (and also returns nothing), you can use the return keyword:

https://github.com/Akuli/jou/blob/ba844331ec27263a61180fa68c9029a63e2e5099/tests/already_exists_error/func.jou#L1-L2

Both of these feel like workarounds and I think I should just add a pass statement.