Module:form of/data

Hello, you have come here looking for the meaning of the word Module:form of/data. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:form of/data, but we will also tell you about its etymology, its characteristics and you will know how to say Module:form of/data in singular and plural. Everything you need to know about the word Module:form of/data you have here. The definition of the word Module:form of/data will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:form of/data, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module provides constants and data finalization for Module:form of and its data modules. For the tag data, see Module:form of/data/1 (more common tags) and Module:form of/data/2 (less common tags).


local export = {}

local ipairs = ipairs
local next = next
local type = type

export.TAG_TYPE = 1
export.GLOSSARY = 2
local SHORTCUTS = 3; export.SHORTCUTS = SHORTCUTS
export.WIKIDATA = 4

export.APPENDIX = true
export.WIKT = 0
export.WP = false

local function process_shortcut(tags, shortcuts, name, shortcut)
	-- If the shortcut is already in the list, then there is a duplicate.
	if shortcuts then
		error("The shortcut \"" .. shortcut .. "\" (for the inflection tag \"" .. name .. "\") conflicts with an existing shortcut for the tag \"" .. shortcuts .. "\".")
	elseif tags then
		error("The shortcut \"" .. shortcut .. "\" (for the inflection tag \"" .. name .. "\") conflicts with an existing tag with that name.")
	end
	shortcuts = name
end

function export.finalize(tags, shortcuts)
	for name, data in next, tags do
		local data_shortcuts = data
		if data_shortcuts then
			if type(data_shortcuts) == "string" then
				process_shortcut(tags, shortcuts, name, data_shortcuts)
			else
				for _, shortcut in ipairs(data_shortcuts) do
					process_shortcut(tags, shortcuts, name, shortcut)
				end
			end
		end
	end
end

return export