La documentació d'ús d'aquest mòdul es pot crear a Mòdul:ca-verb/vestir/ús

-- Formes pures dels verbs -vestir més engolir i renyir.
local export = {}

function export.make_irregulars(forma, zona)
	local radical = forma.inf:gsub("ir$", "")
	local radical_alt = radical == "engol" and "engul" or radical:reverse():gsub("e", "i", 1):reverse()

	local fila = #forma["pres-ind"] + 1
	if zona.bal and not (radical == "engol" or radical == "reny") then
		forma["pres-ind"][fila] = {}
		forma["pres-ind"][fila][1] = radical
		forma["pres-ind"][fila][2] = radical .. "s"
		forma["pres-ind"][fila][3] = radical
		forma["pres-ind"][fila][6] = radical .. "en"
		forma["pres-ind"][fila]["nota"] = "bal"
		fila = fila + 1
	end
	
	if zona.val or zona.alg then
		forma["pres-ind"][fila] = {}
		forma["pres-ind"][fila][1] = radical_alt
		if zona.val then
			forma["pres-ind"][fila][2] = radical_alt .. ((radical == "engol" or radical == "reny") and "s" or "es")
			forma["pres-ind"][fila][3] = radical_alt
			forma["pres-ind"][fila][6] = radical_alt .. "en"
			forma["pres-ind"][fila]["nota"] = "val"
			fila = fila + 1
		end
		if zona.alg then
			if forma["pres-ind"][fila] == nil then
				forma["pres-ind"][fila] = {}
			end
			forma["pres-ind"][fila][2] = radical_alt .. "is"
			forma["pres-ind"][fila][3] = radical_alt .. "i"
			forma["pres-ind"][fila][6] = radical_alt .. "in"
			forma["pres-ind"][fila]["nota"] = "alg"
		end
	end
	
	fila = #forma["pres-subj"] + 1
	if zona.bal and not (radical == "engol" or radical == "reny") then
		forma["pres-subj"][fila] = {}
		forma["pres-subj"][fila][1] = radical .. "i"
		forma["pres-subj"][fila][2] = radical .. "is"
		forma["pres-subj"][fila][3] = radical .. "i"
		forma["pres-subj"][fila][6] = radical .. "in"
		forma["pres-subj"][fila]["nota"] = "bal"
		fila = fila + 1
	end
	
	if zona.alg then
		forma["pres-subj"][fila] = {}
		forma["pres-subj"][fila][1] = radical_alt .. "i"
		forma["pres-subj"][fila][2] = radical_alt .. "is"
		forma["pres-subj"][fila][3] = radical_alt .. "i"
		forma["pres-subj"][fila][6] = radical_alt .. "in"
		forma["pres-subj"][fila]["nota"] = "alg"
		fila = fila + 1
	end
	
	if zona.val then
		forma["pres-subj"][fila] = {}
		forma["pres-subj"][fila][1] = radical_alt .. "a"
		forma["pres-subj"][fila][2] = radical_alt .. "es"
		forma["pres-subj"][fila][3] = radical_alt .. "a"
		forma["pres-subj"][fila][6] = radical_alt .. "en"
		forma["pres-subj"][fila]["nota"] = "val"
		fila = fila + 1
	end
	
	fila = #forma["imp"] + 1
	if zona.bal and not (radical == "engol" or radical == "reny") then
		forma["imp"][fila] = {}
		forma["imp"][fila][2] = radical
		forma["imp"][fila][3] = radical .. "i"
		forma["imp"][fila][6] = radical .. "in"
		forma["imp"][fila]["nota"] = "bal"
		fila = fila + 1
	end
	
	if zona.val or zona.alg then
		forma["imp"][fila] = {}
		forma["imp"][fila][2] = radical_alt
		if zona.val then
			forma["imp"][fila][3] = radical_alt .. "a"
			forma["imp"][fila][6] = radical_alt .. "en"
			forma["imp"][fila]["nota"] = "val"
		else
			forma["imp"][fila]["nota"] = "alg"
		end
	end
	
	return forma
end

return export