Module:Member

local anchor = require('Module:Anchor') local utils = require('Module:Utils')

local p = {}

function p._create(args) -- Add the prefix (property type, method return values) to the output. local output = output .. args.prefix output = output .. mw.text.tag('b', {		class = "member-name";		id = args.name; -- Add the member's name as an anchor so that it can be linked to conveniently.	}, args.name)

local tags = {} do local positional_argument = 1 local tag = args[positional_argument] while tag do			tags[mw.text.trim(tag)] = true positional_argument = positional_argument + 1 tag = args[positional_argument] end end

if args["parameter list"] then output = output .. "(" .. args["parameter list"] .. ")" end

-- Add tags. for tag in next, tags do		if tag == 'deprecated' then output = output .. mw.text.tag('span', {class = 'member-tag'}, "[deprecated]") elseif tag == 'read-only' then output = output .. mw.text.tag('span', {class = 'member-tag'}, "[read-only]") elseif tag == 'write-only' then output = output .. mw.text.tag('span', {class = 'member-tag'}, "[write-only]") else error("Unrecognized tag. Try 'deprecated', 'read-only' or 'write-only'") end end

return ('='):rep(args.level) .. output .. ('='):rep(args.level) end

p.create = utils.make_wrapper_function(p._create)

return p