Added ELSE and WHILE - the language is getting dangerous 💀🤣
ELSE was actually pretty simple: after an IF, just check in the next line
see if it says “ELSE”, skip the keyword and execute whatever comes after.
Done. Took longer to think about than to code.
WHILE was a completely different. After a bit of thinking I came up that WHILE is basically just IF + GOTO
combined. If the condition is true, keep going. If false, i run through the program array for the matching ENDWHILE (counting WHILEs
so you it works with more WHILES. ENDWHILE does the reverse - searches
backwards for its WHILE and jumps back.
Next goal : Synax highlighting
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.