blob: b06ae453ee48f477fed3a00346ebbf62a2909945 [file] [log] [blame] [edit]
40 columns |
>>> Unsplit.
condition ? thenBranch : elseBranch ;
<<<
condition ? thenBranch : elseBranch;
>>> Split because condition splits.
veryLongElement != otherReallyLongElement ? longArgument : arg;
<<<
veryLongElement !=
otherReallyLongElement
? longArgument
: arg;
>>> Split because of split in then branch.
condition ? veryLongExpression +
otherLongExpression : elseExpr;
<<<
condition
? veryLongExpression +
otherLongExpression
: elseExpr;
>>> Split because of split in else branch.
condition ? thenExpression
: veryLongExpression +
otherLongExpression;
<<<
condition
? thenExpression
: veryLongExpression +
otherLongExpression;
>>> Force split all conditionals when nested.
var kind = a ? b ? c : d : e;
<<<
var kind =
a
? b
? c
: d
: e;
>>>
var kind = a ? b : c ? d : e;
<<<
var kind =
a
? b
: c
? d
: e;
>>> Don't force split conditionals when indirectly nested.
var kind = a ? b : (c ? d : e);
<<<
var kind = a ? b : (c ? d : e);