Simplifies a statement like:
x = y ? a : b; Copy
x = y ? a : b;
Into:
if (y) { x = a; } else { x = b; } Copy
if (y) { x = a; } else { x = b; }
$assignmentStmt must be an expression statement (not an inline expression, such as in a varDecl or within another expression). The expression statement must only contain an assignment operator, and the rvalue must be a ternary operator.
Otherwise the function will immediately return.
Expression statement containing an assignment where the right hand side is a ternary operator
Simplifies a statement like:
Into:
$assignmentStmt must be an expression statement (not an inline expression, such as in a varDecl or within another expression). The expression statement must only contain an assignment operator, and the rvalue must be a ternary operator.
Otherwise the function will immediately return.