It's a reasonably common complaint that S2 lacks the break
and continue
statements, so I've added them. It's pretty simple; there's no support for labelled break
to break out of a loop other than the innermost. Better than nothing, though. Support for labels and labelled break could be added later if people want it. Since this patch makes break
and continue
reserved words, it'll break any calls to global functions with these names that appear at the start of an expression statement.
Side note: It's been a long time since I submitted code like this. The directory on my site containing this patch also contains the first piece of code I ever submitted to LJ back in early 2001, and nothing in between. Crazy.