Add bit operator: bit-xor (#5940)

This commit is contained in:
Justin Ma
2022-07-03 19:45:20 +08:00
committed by GitHub
parent 3a38fb94f0
commit 4e90b478b7
8 changed files with 59 additions and 20 deletions

View File

@ -442,6 +442,10 @@ pub fn eval_expression(
let rhs = eval_expression(engine_state, stack, rhs)?;
lhs.bit_or(op_span, &rhs, expr.span)
}
Operator::BitXor => {
let rhs = eval_expression(engine_state, stack, rhs)?;
lhs.bit_xor(op_span, &rhs, expr.span)
}
Operator::BitAnd => {
let rhs = eval_expression(engine_state, stack, rhs)?;
lhs.bit_and(op_span, &rhs, expr.span)