[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to implement this with LuaMacro?
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 22 Jan 2010 13:35:01 +0200
On Fri, Jan 22, 2010 at 1:29 PM, Pavel Shevaev <pacha.shevaev@gmail.com> wrote:
> I started with PARAL trying to implement it as follows:
>
> def('PARAL', {'body';handle_params = true},
> 'parallel(function(self) body end)'
> )
Actually, all you need here is
macro.define ('PARAL',{'body'},'parallel(function(self) body end)')
or even more C-like:
macro.define 'PARAL(body) parallel(function(self) body end)'
The handle_params is only needed when you are defining your own
function to grab parameters. (This case should have been an error on
definition).
Drop me a mail if this doesn't work.
steve d.