local U={}function U.new(U)local a={}local N={}a.__index=N if U then for U,a in pairs((getmetatable(U)).__index)do N[U]=a end end function a.__newindex(U,a,s)assert(N[a]==nil,string.format("\067\097\110\110\111\116 \114\101\097\115\115\105\103\110 \037\115 \105\110 \099\111\110\116\101\120\116",tostring(a)))N[a]=s end return setmetatable({},a)end return U
--[[
	The Context object implements a write-once key-value store. It also allows
	for a new Context object to inherit the entries from an existing one.
]]
local Context = {}

function Context.new(parent)
	local meta = {}
	local index = {}
	meta.__index = index

	if parent then
		for key, value in pairs(getmetatable(parent).__index) do
			index[key] = value
		end
	end

	function meta.__newindex(_obj, key, value)
		assert(index[key] == nil, string.format("Cannot reassign %s in context", tostring(key)))
		index[key] = value
	end

	return setmetatable({}, meta)
end

return Context
