MCPcopy Index your code
hub / github.com/endbasic/endbasic / new

Method new

core/tests/testutils/callables/sum_mixed_fn.rs:33–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32impl SumMixedFunction {
33 pub(super) fn new() -> Rc<Self> {
34 Rc::from(Self {
35 metadata: CallableMetadataBuilder::new("SUM_MIXED")
36 .with_return_type(ExprType::Double)
37 .with_syntax(&[(
38 &[SingularArgSyntax::RequiredValue(
39 RequiredValueSyntax {
40 name: Cow::Borrowed("base"),
41 vtype: ExprType::Double,
42 },
43 ArgSepSyntax::Exactly(ArgSep::Long),
44 )],
45 Some(&RepeatedSyntax {
46 name: Cow::Borrowed("expr"),
47 type_syn: RepeatedTypeSyntax::TypedValue(ExprType::Integer),
48 sep: ArgSepSyntax::Exactly(ArgSep::Long),
49 require_one: false,
50 allow_missing: false,
51 }),
52 )])
53 .test_build(),
54 })
55 }
56}
57
58impl Callable for SumMixedFunction {

Callers

nothing calls this directly

Calls 3

test_buildMethod · 0.80
with_syntaxMethod · 0.80
with_return_typeMethod · 0.80

Tested by

no test coverage detected