Module:ReflectionMetadata

local xml = require("Dev:XML")

local tree_handler = xml.handlers.Tree

-- When there is a single child element, by default it is inserted as a named key instead of a vector. This happens when an enum has a single item, or a class has a single member of a given kind. -- By setting this, we ensure that even in the case there is a single child Item element, we get a vector we can iterate over. tree_handler.options.noreduce.Item = true tree_handler.options.noreduce.bool = true tree_handler.options.noreduce.double = true tree_handler.options.noreduce.string = true

return { data = xml.parse(require("Module:ReflectionMetadata/data"), tree_handler) }