Module:User:ObnoxiousCoder/hit-conj

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is a private module sandbox of ObnoxiousCoder, for their own experimentation. Items in this module may be added and removed at ObnoxiousCoder's discretion; do not rely on this module's stability.


local hit = require("Module:User:ObnoxiousCoder/hit-common")
local render = require("Module:User:ObnoxiousCoder/hit-conj/table")

local mi = require("Module:User:ObnoxiousCoder/hit-conj/mi")
-- local hi = require("Module:User:ObnoxiousCoder/hit-conj/hi")
local export = {}

local conj = {
	["mi"] = mi, 
--	["hi"] = hi
}


function export.main(frame)
	local parent = frame:getParent()
    local args = parent.args
    
    if not conj[args[1]] then
    	error("Expected mi or hi as a conjugation, received '" .. args[0] .. "'")
    end
    
    meta = {
    	title = "Conjugation", 
    	class = "First conjugation",
    	note = "The verbal endings in this table have been normalized. For alternative endings see [[Appendix:Hittite conjugation]]"
    }
    
    
    table_ = conj[args[1]](args)
    
    if args.mid == "no" then 
    	table_.mid = nil
    end
    
    return render(table_, meta)
end


return export