Module:User:Theknightwho/template link/data

local deepcopy = require("Module:table").deepcopy

local magic_words = require("Module:data/magic words")

local data = {}

local parser_functions = {{}, {}} local parser_variables = {{}, {}} local transclusion_modifiers = {} local transclusion_modifier_priorities = {}

for k, v in pairs(magic_words) do	local case_sensitive = v.case_sensitive local link = v.parser_function if link then parser_functions[case_sensitive and 1 or 2][k] = deepcopy(link) end link = v.parser_variable if link then parser_variables[case_sensitive and 1 or 2][k] = link end link = v.transclusion_modifier if link then transclusion_modifiers[k] = link transclusion_modifier_priorities[k] = v.priority end end

data.parser_functions = parser_functions data.parser_variables = parser_variables data.transclusion_modifiers = transclusion_modifiers data.transclusion_modifier_priorities = transclusion_modifier_priorities

return data