lua-users home
lua-l archive

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


On Wed, Jun 10, 2009 at 7:03 PM, Roberto
Ierusalimschy<roberto@inf.puc-rio.br> wrote:
> Any comment about this?
>
>  http://lua-users.org/lists/lua-l/2005-09/msg00548.html
>

It appears that the options are the following:

1) Do not support "continue" anywhere.
2) Disallow "continue" within a repeat ... until construct. Next issue
being when a repeat ... until is nested within a for loop, and a
"continue" appears within the repeat ... until construct, is this
invalid behaviour, or does the "continue" apply to the for loop?
3) Have the parser detect if a "continue" statement causes execution
to jump over a local variable declaration, which is then used in the
"until" clause, and throw an error in this case.
4) Have the parser detect if a "continue" statement causes execution
to jump over a local variable declaration, and cause the "continue" to
initialise any variables which it jumps over to nil.
5) A "continue" within a repeat ... until construct causes execution
to jump back to the statement immediately following the "repeat", thus
skipping the "until" clause entirely.

If option 3 could be implemented efficiently, then would it be an
acceptable way of doing things?