[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Macros and Token Filters Revisited
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 16 Jun 2010 17:40:12 -0300
> > Why not? Just expand tokens with the same line numbers as the tokens that
> > trigger the expansion.
> That can be a useful approach, but it might not be a general solution
> if the lines get rearranged:
> macro square(x) (x*x) -- (1)
> print square(x) -- (2)
> unless bar -- (3)
> if not bar then -- (3)
> print (x*x) end -- (1,2)
> unless you transform the generated code in a contorted way so that the
> lines remain in order.
Right! I was thinking about less drastic rewritting.