protected function markSwitchTable(DOMElement $switch)
	{
		$cases = [];
		$maps  = [];
		foreach ($this->query('./case[@test]', $switch) as $i => $case)
		{
			$map = XPathHelper::parseEqualityExpr($case->getAttribute('test'));
			if ($map === false)
			{
				return;
			}
			$maps     += $map;
			$cases[$i] = [$case, end($map)];
		}
		if (count($maps) !== 1)
		{
			return;
		}

		$switch->setAttribute('branch-key', key($maps));
		foreach ($cases as list($case, $values))
		{
			sort($values);
			$case->setAttribute('branch-values', serialize($values));
		}
	}