mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
feat: render tuple types for API methods
This commit is contained in:

committed by
Lewis Russell

parent
019b2050e1
commit
70d7979439
@@ -174,7 +174,13 @@ local function api_type(t)
|
||||
local as0 = t:match('^ArrayOf%((.*)%)')
|
||||
if as0 then
|
||||
local as = split(as0, ', ')
|
||||
return api_type(as[1]) .. '[]'
|
||||
local a = api_type(as[1])
|
||||
local count = tonumber(as[2])
|
||||
if count then
|
||||
return ('[%s]'):format(a:rep(count, ', '))
|
||||
else
|
||||
return a .. '[]'
|
||||
end
|
||||
end
|
||||
|
||||
local d = t:match('^Dict%((.*)%)')
|
||||
|
Reference in New Issue
Block a user