diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-18 15:42:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 15:42:30 +0100 |
commit | be74807eef13ff8c90d55cf8b22b01d6d33b1641 (patch) | |
tree | 9f7e1cebdb2677057b066df9fea91bce86b4ab6a /runtime/lua/vim/iter.lua | |
parent | d0ae529861594b2e89a436ed2cfb3d2243f8bfcc (diff) | |
download | rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.gz rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.tar.bz2 rneovim-be74807eef13ff8c90d55cf8b22b01d6d33b1641.zip |
docs(lua): more improvements (#24387)
* docs(lua): teach lua2dox how to table
* docs(lua): teach gen_vimdoc.py about local functions
No more need to mark local functions with @private
* docs(lua): mention @nodoc and @meta in dev-lua-doc
* fixup!
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
---------
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/iter.lua')
-rw-r--r-- | runtime/lua/vim/iter.lua | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/runtime/lua/vim/iter.lua b/runtime/lua/vim/iter.lua index 6c1afcad91..7bffcc9c20 100644 --- a/runtime/lua/vim/iter.lua +++ b/runtime/lua/vim/iter.lua @@ -85,7 +85,6 @@ end --- Packed tables use this as their metatable local packedmt = {} ----@private local function unpack(t) if type(t) == 'table' and getmetatable(t) == packedmt then return _G.unpack(t, 1, t.n) @@ -93,7 +92,6 @@ local function unpack(t) return t end ----@private local function pack(...) local n = select('#', ...) if n > 1 then @@ -102,7 +100,6 @@ local function pack(...) return ... end ----@private local function sanitize(t) if type(t) == 'table' and getmetatable(t) == packedmt then -- Remove length tag @@ -120,7 +117,6 @@ end ---@param ... any Function arguments. ---@return boolean True if the iterator stage should continue, false otherwise ---@return any Function arguments. ----@private local function continue(...) if select('#', ...) > 0 then return false, ... @@ -137,7 +133,6 @@ end ---@param ... any Arguments to apply to f ---@return boolean True if the iterator pipeline should continue, false otherwise ---@return any Return values of f ----@private local function apply(f, ...) if select('#', ...) > 0 then return continue(f(...)) @@ -230,7 +225,6 @@ function Iter.map(self, f) --- values passed. ---@param ... any Values to return if cont is false. ---@return any - ---@private local function fn(cont, ...) if cont then return fn(apply(f, next(self))) @@ -270,7 +264,6 @@ end --- Takes all of the values returned by the previous stage --- in the pipeline as arguments. function Iter.each(self, f) - ---@private local function fn(...) if select('#', ...) > 0 then f(...) @@ -383,7 +376,6 @@ function Iter.fold(self, init, f) local acc = init --- Use a closure to handle var args returned from iterator - ---@private local function fn(...) if select(1, ...) ~= nil then acc = f(acc, ...) @@ -525,7 +517,6 @@ function Iter.find(self, f) local result = nil --- Use a closure to handle var args returned from iterator - ---@private local function fn(...) if select(1, ...) ~= nil then if f(...) then @@ -768,7 +759,6 @@ function Iter.any(self, pred) local any = false --- Use a closure to handle var args returned from iterator - ---@private local function fn(...) if select(1, ...) ~= nil then if pred(...) then @@ -792,7 +782,6 @@ end function Iter.all(self, pred) local all = true - ---@private local function fn(...) if select(1, ...) ~= nil then if not pred(...) then @@ -929,7 +918,6 @@ function Iter.new(src, ...) local s, var = ... --- Use a closure to handle var args returned from iterator - ---@private local function fn(...) if select(1, ...) ~= nil then var = select(1, ...) |