lua-users home
lua-l archive

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


I'm having trouble parsing what you want to do.  Do you want to do
something like this:

  for x in object:method() do
    ...
  end

-Rob

On Fri, Apr 20, 2012 at 05:17:45PM +0200, Dirk Laurie wrote:
> I can't say:
>   for x in f = object:method do
> 
> Instead, I must say
>   for f in function(...) return object:method(...) end do
> 
> The error seems to be at syntax level:
> 
> stdin:1: function arguments expected near 'do'
> 
> Is there some philosophical reason why this sugar is not available?
>