fix: log files for generated docs

docs-refactor
sammyette 2022-12-14 22:44:02 -04:00
parent 3f60d9128d
commit 9128a3ff2e
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 4 additions and 1 deletions

View File

@ -11,11 +11,12 @@ for _, fname in ipairs(files) do
local header = f:read '*l'
if not header:match(emmyPattern) then goto continue end
print(fname)
local iface = header:match(emmyPattern)
pieces[iface] = {}
local docPiece = {}
for line in f:lines() do
if line == header then goto continue2 end
if not line:match(emmyPattern) then
@ -39,6 +40,8 @@ for iface, dps in pairs(pieces) do
local path = string.format('docs/api/%s/%s.md', mod, iface)
local f <close> = io.open(path, 'a+')
print(mod, path)
for func, docs in pairs(dps) do
local params = table.filter(docs, function(t)
return t:match '^%-%-%- @param'