A modult a Modul:definition/templates/doc lapon tudod dokumentálni
local export = {}
local m_definition = require("Module:definition")
-- Used for ].
function export.and_lit_t(frame)
local parent_args = frame.getParent and frame:getParent().args or frame
local compat = parent_args
local offset = compat and 0 or 1
local params = {
= {required = true, default = "und"},
= {list = true, allow_holes = true},
= {list = true, allow_holes = true, require_index = true},
= {},
= {},
= {},
= {type = "boolean"},
}
local args = require("Module:parameters").process(parent_args, params)
local lang = args
lang = require("Module:languages").getByCode(lang) or require("Module:languages").err(lang, 1)
local sc = args
sc = (sc and (require("Module:scripts").getByCode(sc) or error("The script code \"" .. sc .. "\" is not valid.")) or nil)
-- Find the maximum index among any of the list parameters.
local maxmaxindex = 0
for k, v in pairs(params) do
if v.list and v.allow_holes and not v.alias_of and args.maxindex > maxmaxindex then
maxmaxindex = args.maxindex
end
end
local terms = {}
for i=1,maxmaxindex do
table.insert(terms, {
term = args,
alt = args,
lang = lang,
sc = sc
})
end
return m_definition.and_lit(terms, args, args, args)
end
return export