lua-users home
lua-l archive

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


> >> By the way, it would also be possible to just use "repeat" which already
> >> is a reserved word.  If its use is restricted to the same places where
> >> "break" and "return" are allowed, I don't think that there is syntactic
> >> ambiguity.
> >
> > [...]
> 
> Depends on whether the next token is "end". [...]

To work as break/return, 'else', 'elseif', and 'until' should also
be accepted:

  if a then break else f() end   -- valid
  repeat break until true        -- valid

That would result in this:

  repeat repeat until true       -- ??

-- Roberto