gilch / hebigo

蛇語(HEH-bee-go): An indentation-based skin for Hissp.
https://github.com/gilch/hissp
Mozilla Public License 2.0
24 stars 3 forks source link

For loop and tests #23

Closed gilch closed 5 years ago

gilch commented 5 years ago

Ports the for macro from Drython, but not everything works yet. break and continue will need their own macros. These should be able to take labels and results like Drython, and unlike Python (but we need them because we have no return statement).

The for macro uses !let's destructuring syntax. This is more powerful than Python's version. To make !let more consistent with for, !let has been changed to require a :from control word where for uses its :in control word.

Also some fixes for the try macro, but it still needs more tests.