[Date Prev][Date Next][Thread Prev][Thread Next]
- 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!
function X (...) <U>
function X (...) local _UPVALUES=U
taking care to handle empty or missing <U>.
A simple state machine can do it.