Skip to content

Commit 466c234

Browse files
willheslamdy
authored andcommitted
Fix logical-not typo, add relevant tokens to tests
1 parent a7e0185 commit 466c234

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/operators.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function processOperation(left, right, operator) {
326326
if (right == 0) opResult = left;
327327
}
328328
// !a, ~a
329-
else if (operator == '~' || operator == '~') {
329+
else if (operator == '!' || operator == '~') {
330330
opResult = operator + right
331331
}
332332
else if (operator == '*') {

test/api.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ var source = `
2828
xy.xy *= uv.yx;
2929
gl_Position = vec4(position.yx / 2.0, 0, 1);
3030
gl_FragColor[0] = gl_FragCoord[0] / gl_Position.length();
31+
32+
bool foo = true;
33+
bool bar = !foo == false && ~foo || foo;
3134
return;
3235
}
3336
@@ -67,6 +70,8 @@ var result = `
6770
xy = new Float32Array([xy[0] * uv[1], xy[1] * uv[0]]);
6871
(gl_Position[0] = position[1] / 2.0, gl_Position[1] = position[0] / 2.0, gl_Position[2] = 0, gl_Position[3] = 1, gl_Position);
6972
gl_FragColor[0] = gl_FragCoord[0] / 4;
73+
var foo = true;
74+
var bar = (!foo == false) && (~foo || foo);
7075
return;
7176
};
7277

0 commit comments

Comments
 (0)