local h=require(script.Parent.Symbol)local k={}function k.new(W,w)local Z=h.new(W)local K={}for k,W in ipairs(w)do K[W]=h.new(W,Z)end local s=setmetatable({_scope=Z},{__index=function(h,w)if K[w]then return K[w]elseif k[w]then return k[w]else error("\085\110\107\110\111\119\110 "..(W..("\058 "..tostring(w))),2)end end,__newindex=function()error("\067\097\110\110\111\116 \097\100\100 \110\101\119 "..W,2)end})return s end function k.Is(W,k)return h.IsInScope(k,W._scope)end return k



local Symbol = require(script.Parent.Symbol)

local EnumList = {}


function EnumList.new(name, enums)
	local scope = Symbol.new(name)
	local enumItems = {}
	for _,enumName in ipairs(enums) do
		enumItems[enumName] = Symbol.new(enumName, scope)
	end
	local self = setmetatable({
		_scope = scope;
	}, {
		__index = function(_t, k)
			if (enumItems[k]) then
				return enumItems[k]
			elseif (EnumList[k]) then
				return EnumList[k]
			else
				error("Unknown " .. name .. ": " .. tostring(k), 2)
			end
		end;
		__newindex = function()
			error("Cannot add new " .. name, 2)
		end;
	})
	return self
end


function EnumList:Is(obj)
	return Symbol.IsInScope(obj, self._scope)
end


return EnumList
