lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I was testing updating a Lua 5.1 project to 5.3 and needed the continue keyword from http://lua-users.org/lists/lua-l/2009-06/msg00331.html.  I couldn't find any updated patch, so I did a quick implementation myself.

This doesn't have the "skipped initialization" check.  This builds on simple branches and goto doesn't do that, so that check doesn't seem necessary now.  This patch does allow continue to not be the last statement in a block, like break.

I'm not actively using this (5.3 didn't improve the issue I was working on, so for now I'm leaving it at 5.1 for other reasons), but I wanted to toss this patch out there in case it's useful to anyone.  This isn't heavily tested, but it passes all of http://www.corsix.org/luacontinue/continue_valid.lua and ran all of my code using continue just fine.

https://github.com/zewt/lua/tree/continue

--
Glenn Maynard