MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / evaluate_bitwise

Function evaluate_bitwise

crates/gitql-engine/src/engine_evaluator.rs:461–476  ·  view source on GitHub ↗
(
    env: &mut Environment,
    expr: &BitwiseExpr,
    titles: &[String],
    object: &Vec<Box<dyn Value>>,
)

Source from the content-addressed store, hash-verified

459}
460
461fn evaluate_bitwise(
462 env: &mut Environment,
463 expr: &BitwiseExpr,
464 titles: &[String],
465 object: &Vec<Box<dyn Value>>,
466) -> Result<Box<dyn Value>, String> {
467 let lhs = evaluate_expression(env, &expr.left, titles, object)?;
468 let rhs = evaluate_expression(env, &expr.right, titles, object)?;
469 match expr.operator {
470 BinaryBitwiseOperator::Or => lhs.or_op(&rhs),
471 BinaryBitwiseOperator::And => lhs.and_op(&rhs),
472 BinaryBitwiseOperator::Xor => lhs.xor_op(&rhs),
473 BinaryBitwiseOperator::RightShift => lhs.shr_op(&rhs),
474 BinaryBitwiseOperator::LeftShift => lhs.shl_op(&rhs),
475 }
476}
477
478fn evaluate_call(
479 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 6

evaluate_expressionFunction · 0.85
or_opMethod · 0.45
and_opMethod · 0.45
xor_opMethod · 0.45
shr_opMethod · 0.45
shl_opMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…