function Argument.Transform(d)if#d.TransformedValues~=0 then return end if d.Type.Listable and#d.RawValue>0 then local C=Util.SplitStringSimple(d.RawValue,"\044")if d.RawValue:sub(#d.RawValue,#d.RawValue)=="\044"then C[#C+1]=""end for C,G in ipairs(C)do d.RawSegments[C]=G d.TransformedValues[C]={d:TransformSegment(G)}end else d.RawSegments[1]=d.RawValue d.TransformedValues[1]={d:TransformSegment(d.RawValue)}end end function Argument.TransformSegment(C,d)if C.Type.Transform then return C.Type.Transform(d,C.Executor)else return d end end
--- Calls the transform function on this argument.
-- The return value(s) from this function are passed to all of the other argument methods.
-- Called automatically at instantiation
function Argument:Transform()
	if #self.TransformedValues ~= 0 then
		return
	end

	if self.Type.Listable and #self.RawValue > 0 then
		local rawSegments = Util.SplitStringSimple(self.RawValue, ",")

		if self.RawValue:sub(#self.RawValue, #self.RawValue) == "," then
			rawSegments[#rawSegments + 1] = "" -- makes auto complete tick over right after pressing ,
		end

		for i, rawSegment in ipairs(rawSegments) do
			self.RawSegments[i] = rawSegment
			self.TransformedValues[i] = { self:TransformSegment(rawSegment) }
		end
	else
		self.RawSegments[1] = self.RawValue
		self.TransformedValues[1] = { self:TransformSegment(self.RawValue) }
	end
end

function Argument:TransformSegment(rawSegment)
	if self.Type.Transform then
		return self.Type.Transform(rawSegment, self.Executor)
	else
		return rawSegment
	end
end
