Skip to content

Commit ad7b0c2

Browse files
Nit: isMultiLine -> isMultiline
1 parent a9adc17 commit ad7b0c2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

jscomp/syntax/src/res_printer.ml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3527,8 +3527,8 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
35273527
Doc.concat
35283528
[spacingBeforeOperator; Doc.text operatorTxt; spacingAfterOperator]
35293529
in
3530-
let printOperand ~isLhs ~isMultiLine expr parentOperator =
3531-
let rec flatten ~isLhs ~isMultiLine expr parentOperator =
3530+
let printOperand ~isLhs ~isMultiline expr parentOperator =
3531+
let rec flatten ~isLhs ~isMultiline expr parentOperator =
35323532
if ParsetreeViewer.isBinaryExpression expr then
35333533
match expr with
35343534
| {
@@ -3541,7 +3541,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
35413541
ParsetreeViewer.flattenableOperators parentOperator operator
35423542
&& not (ParsetreeViewer.hasAttributes expr.pexp_attributes)
35433543
then
3544-
let leftPrinted = flatten ~isLhs:true ~isMultiLine left operator in
3544+
let leftPrinted = flatten ~isLhs:true ~isMultiline left operator in
35453545
let rightPrinted =
35463546
let rightPrinteableAttrs, rightInternalAttrs =
35473547
ParsetreeViewer.partitionPrintableAttributes
@@ -3586,7 +3586,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
35863586
]
35873587
else
35883588
match operator with
3589-
| ("|." | "|.u") when isMultiLine ->
3589+
| ("|." | "|.u") when isMultiline ->
35903590
(* If the pipe-chain is written over multiple lines, break automatically
35913591
* `let x = a->b->c -> same line, break when line-width exceeded
35923592
* `let x = a->
@@ -3679,7 +3679,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
36793679
| Braced braces -> printBraces doc expr braces
36803680
| Nothing -> doc)
36813681
in
3682-
flatten ~isLhs ~isMultiLine expr parentOperator
3682+
flatten ~isLhs ~isMultiline expr parentOperator
36833683
in
36843684
match expr.pexp_desc with
36853685
| Pexp_apply
@@ -3693,8 +3693,8 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
36933693
|| ParsetreeViewer.isBinaryExpression rhs
36943694
|| printAttributes ~state expr.pexp_attributes cmtTbl <> Doc.nil) ->
36953695
let lhsHasCommentBelow = hasCommentBelow cmtTbl lhs.pexp_loc in
3696-
let lhsDoc = printOperand ~isLhs:true ~isMultiLine:false lhs op in
3697-
let rhsDoc = printOperand ~isLhs:false ~isMultiLine:false rhs op in
3696+
let lhsDoc = printOperand ~isLhs:true ~isMultiline:false lhs op in
3697+
let rhsDoc = printOperand ~isLhs:false ~isMultiline:false rhs op in
36983698
Doc.group
36993699
(Doc.concat
37003700
[
@@ -3711,7 +3711,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
37113711
| Pexp_apply
37123712
( {pexp_desc = Pexp_ident {txt = Longident.Lident operator}},
37133713
[(Nolabel, lhs); (Nolabel, rhs)] ) ->
3714-
let isMultiLine =
3714+
let isMultiline =
37153715
lhs.pexp_loc.loc_start.pos_lnum < rhs.pexp_loc.loc_start.pos_lnum
37163716
in
37173717

@@ -3720,7 +3720,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
37203720
let rhsDoc =
37213721
printOperand
37223722
~isLhs:(ParsetreeViewer.isRhsBinaryOperator operator)
3723-
~isMultiLine rhs operator
3723+
~isMultiline rhs operator
37243724
in
37253725
Doc.concat
37263726
[
@@ -3740,7 +3740,7 @@ and printBinaryExpression ~state (expr : Parsetree.expression) cmtTbl =
37403740
[
37413741
printOperand
37423742
~isLhs:(not @@ ParsetreeViewer.isRhsBinaryOperator operator)
3743-
~isMultiLine lhs operator;
3743+
~isMultiline lhs operator;
37443744
right;
37453745
])
37463746
in

0 commit comments

Comments
 (0)