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

Method visit_CreateList

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

Source from the content-addressed store, hash-verified

862 }
863
864 fn visit_CreateList(&mut self, ctx: &CreateListContext<'_>) -> Self::Return {
865 let list_id = self.helper.next_id_for_token(ctx.op.as_deref());
866 let (elements, optionals) = match &ctx.elems {
867 None => (Vec::default(), Vec::default()),
868 Some(elements) => self.list_initializer_list(elements.deref()),
869 };
870 IdedExpr {
871 id: list_id,
872 expr: Expr::List(ListExpr::new_with_optionals(elements, optionals)),
873 }
874 }
875
876 fn visit_CreateStruct(&mut self, ctx: &CreateStructContext<'_>) -> Self::Return {
877 let struct_id = self.helper.next_id_for_token(ctx.op.as_deref());

Callers

nothing calls this directly

Calls 3

next_id_for_tokenMethod · 0.80
list_initializer_listMethod · 0.80
derefMethod · 0.45

Tested by

no test coverage detected