fix(meta): add nil return types to lpeg functions

This commit is contained in:
Maria José Solano 2023-09-24 23:14:06 -07:00 committed by Christian Clason
parent 5198a2555d
commit 4db77017fb

View File

@ -42,7 +42,7 @@ local Pattern = {}
--- @param pattern vim.lpeg.Pattern
--- @param subject string
--- @param init? integer
--- @return integer|vim.lpeg.Capture
--- @return integer|vim.lpeg.Capture|nil
function vim.lpeg.match(pattern, subject, init) end
--- 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 init? integer
--- @return integer|vim.lpeg.Capture
--- @return integer|vim.lpeg.Capture|nil
function Pattern:match(subject, init) end
--- Returns the string `"pattern"` if the given value is a pattern, otherwise `nil`.