function Argument.new(g,q,N)local t={Command=g;Type=nil;Name=q.Name;Object=q;Required=q.Default==nil and q.Optional~=true;Executor=g.Executor,RawValue=nil,RawSegments={};TransformedValues={},Prefix=nil}local P,O,Z=Util.ParsePrefixedUnionType(TYPE_DEFAULTS[q.Type]or q.Type,N)t.Type=g.Dispatcher.Registry:GetType(P)t.RawValue=O t.Prefix=Z if t.Type==nil then error(string.format("\037\115 \104\097\115 \097\110 \117\110\114\101\103\105\115\116\101\114\101\100 \116\121\112\101 \037\113",t.Name or"\060\110\111\110\101\062",P or"\060\110\111\110\101\062"))end setmetatable(t,Argument)t:Transform()return t end
--- Returns a new ArgumentContext, an object that handles parsing and validating arguments
function Argument.new(command, argumentObject, value)
	local self = {
		Command = command, -- The command that owns this argument
		Type = nil, -- The type definition
		Name = argumentObject.Name, -- The name for this specific argument
		Object = argumentObject, -- The raw ArgumentObject (definition)
		Required = argumentObject.Default == nil and argumentObject.Optional ~= true, -- If the argument is required or not.
		Executor = command.Executor, -- The player who is running the command
		RawValue = nil, -- The raw, unparsed value
		RawSegments = {}, -- The raw, unparsed segments (if the raw value was comma-sep)
		TransformedValues = {}, -- The transformed value (generated later)
		Prefix = nil, -- The prefix for this command (%Team)
	}

	local parsedType, parsedRawValue, prefix =
		Util.ParsePrefixedUnionType(TYPE_DEFAULTS[argumentObject.Type] or argumentObject.Type, value)

	self.Type = command.Dispatcher.Registry:GetType(parsedType)
	self.RawValue = parsedRawValue
	self.Prefix = prefix

	if self.Type == nil then
		error(string.format("%s has an unregistered type %q", self.Name or "<none>", parsedType or "<none>"))
	end

	setmetatable(self, Argument)

	self:Transform()

	return self
end
