jmeaster30 / ocean

A C-like programming language (get it like sea-like like an ocean lol)
GNU General Public License v3.0
0 stars 0 forks source link

It would be nice to have an implicit "next" label for branches #76

Open jmeaster30 opened 9 months ago

jmeaster30 commented 9 months ago

I found I wrote this quite a bit

branch div5 loopfinal
label div5

and either we turn branch into a conditional jump where if the evaluated expression is false then it jumps to the 1 target supplied OR there is a reserved label "next" that allows the above code to just look like

branch next loopfinal

If I cant think of a use where we wouldn't always use 'next' then I'll just turn 'branch' into 'jumpconditional' or something