From 4db77017fb7ab9321817674a5f5533df4cd03f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maria=20Jos=C3=A9=20Solano?= Date: Sun, 24 Sep 2023 23:14:06 -0700 Subject: [PATCH] fix(meta): add nil return types to lpeg functions --- runtime/lua/vim/_meta/lpeg.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/lua/vim/_meta/lpeg.lua b/runtime/lua/vim/_meta/lpeg.lua index 42e77aaaba..42c9a6449e 100644 --- a/runtime/lua/vim/_meta/lpeg.lua +++ b/runtime/lua/vim/_meta/lpeg.lua @@ -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`.