@@ -267,19 +267,20 @@ let operator_precedence operator =
267
267
| ":=" -> 1
268
268
| "||" -> 2
269
269
| "&&" -> 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
278
279
| _ -> 0
279
280
280
281
let is_unary_operator operator =
281
282
match operator with
282
- | "~+" | "~+." | "~-" | "~-." | "~~" | "not" -> true
283
+ | "~+" | "~+." | "~-" | "~-." | "~~~ " | "not" -> true
283
284
| _ -> false
284
285
285
286
let is_unary_expression expr =
@@ -293,21 +294,11 @@ let is_unary_expression expr =
293
294
true
294
295
| _ -> false
295
296
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
-
306
297
let is_binary_operator operator =
307
298
match operator with
308
299
| " :=" | " ||" | " &&" | " ==" | " ===" | " <" | " >" | " !=" | " !==" | " <=" | " >="
309
300
| "+" | "+." | "-" | "-." | "++" | "*" | "*." | "/" | "/." | "**" | "->"
310
- | "<>" | "%" | "& " | "^" | "<<" | ">>" | ">>>" ->
301
+ | "<>" | "%" | "||| " | "^^^" | "&&& " | "<<" | ">>" | ">>>" ->
311
302
true
312
303
| _ -> false
313
304
0 commit comments