mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix(meta): add nil return types to lpeg functions
This commit is contained in:

committed by
Christian Clason

parent
5198a2555d
commit
4db77017fb
@@ -42,7 +42,7 @@ local Pattern = {}
|
|||||||
--- @param pattern vim.lpeg.Pattern
|
--- @param pattern vim.lpeg.Pattern
|
||||||
--- @param subject string
|
--- @param subject string
|
||||||
--- @param init? integer
|
--- @param init? integer
|
||||||
--- @return integer|vim.lpeg.Capture
|
--- @return integer|vim.lpeg.Capture|nil
|
||||||
function vim.lpeg.match(pattern, subject, init) end
|
function vim.lpeg.match(pattern, subject, init) end
|
||||||
|
|
||||||
--- Matches the given `pattern` against the `subject` string. If the match succeeds, returns the
|
--- Matches the given `pattern` against the `subject` string. If the match succeeds, returns the
|
||||||
@@ -64,7 +64,7 @@ function vim.lpeg.match(pattern, subject, init) end
|
|||||||
---
|
---
|
||||||
--- @param subject string
|
--- @param subject string
|
||||||
--- @param init? integer
|
--- @param init? integer
|
||||||
--- @return integer|vim.lpeg.Capture
|
--- @return integer|vim.lpeg.Capture|nil
|
||||||
function Pattern:match(subject, init) end
|
function Pattern:match(subject, init) end
|
||||||
|
|
||||||
--- Returns the string `"pattern"` if the given value is a pattern, otherwise `nil`.
|
--- Returns the string `"pattern"` if the given value is a pattern, otherwise `nil`.
|
||||||
|
Reference in New Issue
Block a user