function luaY.check_match(e,M,O,y,K)if not e:testnext(M,O)then if K==M.linenumber then e:error_expected(M,O)else luaX:syntaxerror(M,string.format(e.LUA_QS..(" \101\120\112\101\099\116\101\100 \040\116\111 \099\108\111\115\101 "..(e.LUA_QS.." \097\116 \108\105\110\101 \037\100\041")),luaX:token2str(M,O),luaX:token2str(M,y),K))end end end
------------------------------------------------------------------------
-- verifies token conditions are met or else throw error
------------------------------------------------------------------------
function luaY:check_match(ls, what, who, where)
	if not self:testnext(ls, what) then
		if where == ls.linenumber then
			self:error_expected(ls, what)
		else
			luaX:syntaxerror(
				ls,
				string.format(
					self.LUA_QS .. " expected (to close " .. self.LUA_QS .. " at line %d)",
					luaX:token2str(ls, what),
					luaX:token2str(ls, who),
					where
				)
			)
		end
	end
end
