[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lpeg as a part of lua (was: An introduction to Lua)
- From: Sean Conner <sean@...>
- Date: Mon, 23 Oct 2017 03:01:09 -0400
It was thus said that the Great Sean Conner once stated:
>
> function range(low,high)
> return lpeg.Cmt(d^1,function(subject,position,capture)
> local v = tostring(capture)
> if capture >= low and capture <= high then
> return position,v
> end
> end)
> end
This should be:
function range(low,high)
return lpeg.Cmt(d^1,function(subject,position,capture)
local v = tostring(capture)
if v >= low and v <= high then
return position,v
end
end)
end
-spc (Oops)