MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / visit_Negate

Method visit_Negate

cel/src/parser/parser.rs:702–716  ·  view source on GitHub ↗
(&mut self, ctx: &NegateContext<'_>)

Source from the content-addressed store, hash-verified

700 }
701
702 fn visit_Negate(&mut self, ctx: &NegateContext<'_>) -> Self::Return {
703 match &ctx.member() {
704 None => {
705 self.report_error::<ParseError, _>(&ctx.start(), None, "No `MemberContextAll`!")
706 }
707 Some(member) => {
708 if ctx.ops.len() % 2 == 0 {
709 self.visit(member.as_ref());
710 }
711 let op_id = self.helper.next_id(&ctx.ops[0]);
712 let target = self.visit(member.as_ref());
713 self.global_call_or_macro(op_id, operators::NEGATE.to_string(), vec![target])
714 }
715 }
716 }
717
718 fn visit_MemberCall(&mut self, ctx: &MemberCallContext<'_>) -> Self::Return {
719 if let (Some(operand), Some(id), Some(open)) = (&ctx.member(), &ctx.id, &ctx.open) {

Callers

nothing calls this directly

Calls 5

startMethod · 0.80
visitMethod · 0.80
next_idMethod · 0.80
global_call_or_macroMethod · 0.80
memberMethod · 0.45

Tested by

no test coverage detected