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

Function evaluate_prefix_unary

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

Source from the content-addressed store, hash-verified

318}
319
320fn evaluate_prefix_unary(
321 env: &mut Environment,
322 expr: &UnaryExpr,
323 titles: &[String],
324 object: &Vec<Box<dyn Value>>,
325) -> Result<Box<dyn Value>, String> {
326 let rhs = evaluate_expression(env, &expr.right, titles, object)?;
327 match expr.operator {
328 PrefixUnaryOperator::Plus => rhs.plus_op(),
329 PrefixUnaryOperator::Minus => rhs.neg_op(),
330 PrefixUnaryOperator::Bang => rhs.bang_op(),
331 PrefixUnaryOperator::Not => rhs.not_op(),
332 }
333}
334
335fn evaluate_arithmetic(
336 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 5

evaluate_expressionFunction · 0.85
plus_opMethod · 0.45
neg_opMethod · 0.45
bang_opMethod · 0.45
not_opMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…