lua-users home
lua-l archive

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


Luiz,

That was the first way I went about implementing it, however
I hadn't thought of setting the lookahead token to get the "."
functional. I feel enlightened now, ty =).

There is one place the token filter solution may or may not
work as intended though:

function box:getvolume()
  return @getwidth()*@getheight()*@getdepth()
end

As you'd need to put explicitly put self in each of the
parenthesis. I opted to make ":" the default case,
and if someone needs to perform a regular call on a field
value use:

self.regularfunc()

On Thu Jan 24  1:45 , Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> sent:

>'@' as sugar for 'self.' can be done with a simple token filter: