[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Declared UpValues, change to Parser.
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 4 May 2016 07:41:36 -0300
> You can do that without changing the parser.
> All you need to do is to use the upvalues in the
> desired order at the start of the function before
> referring to anything else.
Indeed. And it seems a perfect job for ltokenp which I've just announced!
Just replace
function X (...) <U>
by
function X (...) local _UPVALUES=U
taking care to handle empty or missing <U>.
A simple state machine can do it.