Skip to content

Commit 7d5ab21

Browse files
committed
fix
1 parent dcd890f commit 7d5ab21

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

compiler/syntax/src/res_parsetree_viewer.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ let is_binary_operator operator =
301301
match operator with
302302
| ":=" | "||" | "&&" | "==" | "===" | "<" | ">" | "!=" | "!==" | "<=" | ">="
303303
| "|>" | "+" | "+." | "-" | "-." | "++" | "*" | "*." | "/" | "/." | "**"
304-
| "->" | "<>" | "%" | "^" | "<<" ->
304+
| "->" | "<>" | "%" | "^" | "<<" | ">>" | ">>>" ->
305305
true
306306
| _ -> false
307307

tests/tests/src/unified_ops_test.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ function bxor_bigint(a, b) {
7575
return a ^ b;
7676
}
7777

78-
let shl_bigint = (1n << 2n);
78+
let bigintShiftLeft = (1n << 2n);
7979

80-
let shr_bigint = (8n >> 2n);
80+
let bigintShiftRight = (8n >> 2n);
8181

8282
let int = 3;
8383

84-
let shl_int = 4;
84+
let intShiftLeft = 4;
8585

86-
let shr_int = 2;
86+
let intShiftRight = 2;
8787

88-
let lsr_int = 2147483647;
88+
let intShiftRightUnsigned = 2147483647;
8989

9090
export {
9191
int,
@@ -111,10 +111,10 @@ export {
111111
pow_overflow,
112112
bxor_int,
113113
bxor_bigint,
114-
shl_int,
115-
shr_int,
116-
lsr_int,
117-
shl_bigint,
118-
shr_bigint,
114+
intShiftLeft,
115+
intShiftRight,
116+
intShiftRightUnsigned,
117+
bigintShiftLeft,
118+
bigintShiftRight,
119119
}
120120
/* No side effect */

tests/tests/src/unified_ops_test.res

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@ let pow_overflow = 2147483647 ** 2
3030
let bxor_int = (a, b) => a ^ b
3131
let bxor_bigint = (a: bigint, b) => a ^ b
3232

33-
let shl_int = 1 << 2
34-
let shr_int = 8 >> 2
35-
let lsr_int = -1 >>> 1
33+
let intShiftLeft = 1 << 2
34+
let intShiftRight = 8 >> 2
35+
let intShiftRightUnsigned = -2 >>> 1
3636

37-
let lhs_shift = (a: int, b) => a << b
38-
let rhs_shift = (a, b: int) => a << b
39-
let unknown_shift = (a, b) => a << b
40-
41-
let shl_bigint = 1n << 2n
42-
let shr_bigint = 8n >> 2n
37+
let bigintShiftLeft = 1n << 2n
38+
let bigintShiftRight = 8n >> 2n

0 commit comments

Comments
 (0)