Extract assignment expression from if condition