@@ -267,19 +267,20 @@ let operator_precedence operator =
267267 | ":=" -> 1
268268 | "||" -> 2
269269 | "&&" -> 3
270- | "^" -> 4
271- | "&" -> 5
272- | "==" | "===" | "<" | ">" | "!=" | "<>" | "!==" | "<=" | ">=" -> 6
273- | "<<" | ">>" | ">>>" -> 7
274- | "+" | "+." | "-" | "-." | "++" -> 8
275- | "*" | "*." | "/" | "/." | "%" -> 9
276- | "**" -> 10
277- | "#" | "##" | "->" -> 11
270+ | "|||" -> 4
271+ | "^^^" -> 5
272+ | "&&&" -> 6
273+ | "==" | "===" | "<" | ">" | "!=" | "<>" | "!==" | "<=" | ">=" -> 7
274+ | "<<" | ">>" | ">>>" -> 8
275+ | "+" | "+." | "-" | "-." | "++" -> 9
276+ | "*" | "*." | "/" | "/." | "%" -> 10
277+ | "**" -> 11
278+ | "#" | "##" | "->" -> 12
278279 | _ -> 0
279280
280281let is_unary_operator operator =
281282 match operator with
282- | "~+" | "~+." | "~-" | "~-." | "~~" | "not" -> true
283+ | "~+" | "~+." | "~-" | "~-." | "~~~ " | "not" -> true
283284 | _ -> false
284285
285286let is_unary_expression expr =
@@ -293,21 +294,11 @@ let is_unary_expression expr =
293294 true
294295 | _ -> false
295296
296- let is_unary_bitnot_expression expr =
297- match expr.pexp_desc with
298- | Pexp_apply
299- {
300- funct = {pexp_desc = Pexp_ident {txt = Longident. Lident " ~~" }};
301- args = [(Nolabel , _arg)];
302- } ->
303- true
304- | _ -> false
305-
306297let is_binary_operator operator =
307298 match operator with
308299 | " :=" | " ||" | " &&" | " ==" | " ===" | " <" | " >" | " !=" | " !==" | " <=" | " >="
309300 | "+" | "+." | "-" | "-." | "++" | "*" | "*." | "/" | "/." | "**" | "->"
310- | "<>" | "%" | "& " | "^" | "<<" | ">>" | ">>>" ->
301+ | "<>" | "%" | "||| " | "^^^" | "&&& " | "<<" | ">>" | ">>>" ->
311302 true
312303 | _ -> false
313304
0 commit comments