Closed BNNorman closed 6 years ago
Good comments. I gave up on IF - ELSE - ENDIF type constructions when I kept forgetting them as I was writing the code.
I've actually reached the scary point where I quite like Python's indenting, and it occurred to me that if I want to use my language as a stepping stone to Python it might be a good idea to use indenting. If I use indenting I need begin-end otherwise I don't know when to close off loops.
I got the indentation working so no need for WEND, ENDFOREVER or ENDIF. BEGIN and END are not really required (as per Python) but if BEGIN is used the lexical analyser expects an indented statement to follow.
Good stuff. Indenting text after a BEGIN makes a lot of sense, I'll see if I can modify the HullOs code to support that. f
On 19 March 2018 at 10:59, Brian notifications@github.com wrote:
I got the indentation working so no need for WEND, ENDFOREVER or ENDIF. BEGIN and END are not really required (as per Python) but if BEGIN is used the lexical analyser expects an indented statement to follow.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HullPixelbot/HullOS/issues/1#issuecomment-374174375, or mute the thread https://github.com/notifications/unsubscribe-auth/ADO8sbfRv5jARABSedfUkFNGHLVzxBMRks5tf4-tgaJpZM4SPB5R .
Ok.
Looking through your spec Rob - Are BEGIN and END really needed? Surely IF-ELSE-ENDIF puts boundaries on the code. Also possible are WHILE-WEND, FOREVER-ENDFOREVER.
This would mean that indented code is optional (I hate python's indenting - so easy to get out of kilter).