[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Next Version of Lua?
- From: Peter Cawley <lua@...>
- Date: Wed, 10 Jun 2009 19:45:32 +0100
On Wed, Jun 10, 2009 at 7:03 PM, Roberto
> Any comment about this?
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?