mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-09 00:14:10 -08:00
Fix bug with JS operator precedence
This commit is contained in:
parent
675abe8740
commit
861742a2fb
|
@ -1718,9 +1718,14 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext
|
||||||
writer.append(')');
|
writer.append(')');
|
||||||
break;
|
break;
|
||||||
case INT:
|
case INT:
|
||||||
precedence = Precedence.BITWISE_OR;
|
visitBinary(BinaryOperation.BITWISE_OR, "|", () -> expr.getValue().acceptVisitor(this),
|
||||||
expr.getValue().acceptVisitor(this);
|
() -> {
|
||||||
writer.ws().append("|").ws().append("0");
|
try {
|
||||||
|
writer.append("0");
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new RenderingException("IO error occurred", e);
|
||||||
|
}
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
expr.getValue().acceptVisitor(this);
|
expr.getValue().acceptVisitor(this);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user