mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
feat: added support for optional params to lua2dox
This commit is contained in:
parent
453fffde16
commit
24a1c7f556
@ -417,8 +417,8 @@ end
|
|||||||
---@generic T: table
|
---@generic T: table
|
||||||
---@param dst T List which will be modified and appended to
|
---@param dst T List which will be modified and appended to
|
||||||
---@param src table List from which values will be inserted
|
---@param src table List from which values will be inserted
|
||||||
---@param start number|nil Start index on src. Defaults to 1
|
---@param start? number Start index on src. Defaults to 1
|
||||||
---@param finish number|nil Final index on src. Defaults to `#src`
|
---@param finish? number Final index on src. Defaults to `#src`
|
||||||
---@return T dst
|
---@return T dst
|
||||||
function vim.list_extend(dst, src, start, finish)
|
function vim.list_extend(dst, src, start, finish)
|
||||||
vim.validate({
|
vim.validate({
|
||||||
|
@ -420,6 +420,10 @@ function TLua2DoX_filter.readfile(this,AppStamp,Filename)
|
|||||||
local type_index = 2
|
local type_index = 2
|
||||||
if magic_split[1] == 'param' then
|
if magic_split[1] == 'param' then
|
||||||
type_index = type_index + 1
|
type_index = type_index + 1
|
||||||
|
if magic_split[type_index] and magic_split[2]:find("%?$") then
|
||||||
|
magic_split[type_index] = magic_split[type_index] .. "|nil"
|
||||||
|
magic_split[2] = magic_split[2]:sub(1, -2)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if magic_split[type_index] then
|
if magic_split[type_index] then
|
||||||
|
Loading…
Reference in New Issue
Block a user