@@ -271,7 +271,7 @@ let operator_precedence operator =
271
271
| "||" -> 2
272
272
| "&&" -> 3
273
273
| "=" | "==" | "<" | ">" | "!=" | "<>" | "!==" | "<=" | ">=" | "|>" -> 4
274
- | "+" | "+." | "-" | "-." | "^ " -> 5
274
+ | "+" | "+." | "-" | "-." | "++ " -> 5
275
275
| "*" | "*." | "/" | "/." | "%" -> 6
276
276
| "**" -> 7
277
277
| "#" | "##" | "->" -> 8
@@ -297,8 +297,8 @@ let is_unary_expression expr =
297
297
let is_binary_operator operator =
298
298
match operator with
299
299
| " :=" | " ||" | " &&" | " =" | " ==" | " <" | " >" | " !=" | " !==" | " <=" | " >="
300
- | "|>" | "+" | "+." | "-" | "-." | "^ " | "*" | "*." | "/" | "/." | "**" | "-> "
301
- | "<>" | "%" ->
300
+ | " |>" | " +" | " +." | " -" | " -." | " ++ " | " *" | " *." | " /" | " /." | " **"
301
+ | "->" | " <>" | "%" ->
302
302
true
303
303
| _ -> false
304
304
@@ -314,7 +314,7 @@ let is_binary_expression expr =
314
314
args = [(Nolabel , _operand1); (Nolabel , _operand2)];
315
315
}
316
316
when is_binary_operator operator
317
- && not (operator_loc.loc_ghost && operator = " ^ " )
317
+ && not (operator_loc.loc_ghost && operator = " ++ " )
318
318
(* template literal *) ->
319
319
true
320
320
| _ -> false
@@ -643,7 +643,7 @@ let is_template_literal expr =
643
643
match expr.pexp_desc with
644
644
| Pexp_apply
645
645
{
646
- funct = {pexp_desc = Pexp_ident {txt = Longident. Lident " ^ " }};
646
+ funct = {pexp_desc = Pexp_ident {txt = Longident. Lident " ++ " }};
647
647
args = [(Nolabel , _); (Nolabel , _)];
648
648
}
649
649
when has_template_literal_attr expr.pexp_attributes ->
0 commit comments