Fix syntax errors in builtin.lpeg (#263)
This commit is contained in:
parent
77e72bf92a
commit
5b2ddb0364
|
@ -64,7 +64,7 @@ function lpeg.P(value) end
|
||||||
-- characters with code between the codes of x and y (both inclusive).
|
-- characters with code between the codes of x and y (both inclusive).
|
||||||
-- As an example, the pattern `lpeg.R("09")` matches any digit, and `lpeg.R("az",
|
-- As an example, the pattern `lpeg.R("09")` matches any digit, and `lpeg.R("az",
|
||||||
-- "AZ")` matches any ASCII letter.
|
-- "AZ")` matches any ASCII letter.
|
||||||
function lpeg.R({range}) end
|
function lpeg.R(range) end
|
||||||
|
|
||||||
---
|
---
|
||||||
-- Returns a pattern that matches any single character that appears in the given
|
-- Returns a pattern that matches any single character that appears in the given
|
||||||
|
@ -197,7 +197,7 @@ function lpeg.Ct(patt) end
|
||||||
---
|
---
|
||||||
-- Creates a match-time capture. Unlike all other captures, this one is
|
-- Creates a match-time capture. Unlike all other captures, this one is
|
||||||
-- evaluated immediately when a match occurs. It forces the immediate evaluation
|
-- evaluated immediately when a match occurs. It forces the immediate evaluation
|
||||||
-- of all its nested captures and then calls function.
|
-- of all its nested captures and then calls func.
|
||||||
-- The given function gets as arguments the entire subject, the current position
|
-- The given function gets as arguments the entire subject, the current position
|
||||||
-- (after the match of patt), plus any capture values produced by patt.
|
-- (after the match of patt), plus any capture values produced by patt.
|
||||||
-- The first value returned by function defines how the match happens. If the
|
-- The first value returned by function defines how the match happens. If the
|
||||||
|
@ -209,6 +209,6 @@ function lpeg.Ct(patt) end
|
||||||
-- match fails.
|
-- match fails.
|
||||||
-- Any extra values returned by the function become the values produced by the
|
-- Any extra values returned by the function become the values produced by the
|
||||||
-- capture.
|
-- capture.
|
||||||
function lpeg.Cmt(patt, function) end
|
function lpeg.Cmt(patt, func) end
|
||||||
|
|
||||||
return lpeg
|
return lpeg
|
||||||
|
|
Loading…
Reference in New Issue