Replace switch structure with a block.