lua-users home
lua-l archive

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


"Fabio Mascarenhas" <mascarenhas@acm.org> writes:
> I also have a suggestion for Lpeg, an optional parameter to match, a Lua
> object that gets passed as the first argument in any function captures, if
> present:
>
> lpeg.match(expression, subject, idx, state)

Yes, that would be very nice.

It would make it possible, in many cases, to construct patterns once at
load time instead of needing to construct them in a location where the
appropriate closed-over information is visible.

-Miles

-- 
"1971 pickup truck; will trade for guns"