local A="\083\121\109\098\111\108"local U={}U.__index=U function U.new(l,d)assert(l~=nil,"\083\121\109\098\111\108 \073\068 \099\097\110\110\111\116 \098\101 \110\105\108")if d~=nil then assert(U.Is(d),"\083\099\111\112\101 \109\117\115\116 \098\101 \097 \083\121\109\098\111\108 \111\114 \110\105\108")end local Y=setmetatable({ClassName=A,_id=l,_scope=d},U)return Y end function U.Is(A)return type(A)=="\116\097\098\108\101"and getmetatable(A)==U end function U.IsInScope(A,l)return U.Is(A)and A._scope==l end function U.__tostring(A)return("\083\121\109\098\111\108\060\037\115\062"):format(A._id)end return U



local CLASSNAME = "Symbol"

local Symbol = {}
Symbol.__index = Symbol


function Symbol.new(id, scope)
	assert(id ~= nil, "Symbol ID cannot be nil")
	if (scope ~= nil) then
		assert(Symbol.Is(scope), "Scope must be a Symbol or nil")
	end
	local self = setmetatable({
		ClassName = CLASSNAME;
		_id = id;
		_scope = scope;
	}, Symbol)
	return self
end


function Symbol.Is(obj)
	return (type(obj) == "table" and getmetatable(obj) == Symbol)
end


function Symbol.IsInScope(obj, scope)
	return (Symbol.Is(obj) and obj._scope == scope)
end


function Symbol:__tostring()
	return ("Symbol<%s>"):format(self._id)
end


return Symbol
