<%- reffd:read("*a") %>
<% reffd:close() %>
<% else %>
<%- header.short_desc %>
<% header.short_desc = nil %>
<% end %>
<% if header.desc then %>
<%- header.desc or "" %>
<% header.desc = nil %>
<% end %>
<% if header.inherits then %>
Inherits from
<% assert(header.inherits,"Failed to find field 'inherits'") %>
<% for _,name in pairs(header.inherits) do %>
<%- name %>
<% end %>
<% end %>
<%- header.name %>
<% if header.short_desc then %>
Contents
<% assert(funcorder and type(funcorder) == "table" , "Failed to find 'funcorder'") %>
<% for _, funcname in ipairs(funcorder) do %>
<% local data = header[funcname] %>
<% if data and data.short_desc then %>
Name
Description
<% if data.type == "function" or data.type == "method" then %>
<% end %>
<% end %>
<%- funcsig({funcname = funcname, func = header[funcname]}) %>
<%- data.short_desc %>
<% else %>
<%- data.name %>
<%- data.short_desc %>
<% end %>
<% local func_sec = assert(et.compile(require("mdoc.files.func"))) %> <% assert(funcorder and type(funcorder) == "table", "Failed to find funcorder 2") %> <% for _, funcname in ipairs(funcorder) do %> <% local data = header[funcname] %> <% if data.type then %> <% if data.type == "method" or data.type == "function" then %> <%- assert(func_sec{ name = funcname, data = data }) %>
<% elseif data.type == "field" then %>
<%- funcname %>
<%- data.desc or "" %>
<% else %> <% if funcname ~= "name" and funcname ~= "type" then %>
Unknown field type: <%- data.type or "" %> for <%- funcname %>
<%- tostring(data) %>
<%- tostring(header) %>
<% end %> <% end %> <% end %> <% end %> <% end %>