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

Method with_syntax

core/src/callable.rs:490–499  ·  view source on GitHub ↗

Sets the syntax specifications for this callable.

(
        mut self,
        syntaxes: &'static [(&'static [SingularArgSyntax], Option<&'static RepeatedSyntax>)],
    )

Source from the content-addressed store, hash-verified

488
489 /// Sets the syntax specifications for this callable.
490 pub fn with_syntax(
491 mut self,
492 syntaxes: &'static [(&'static [SingularArgSyntax], Option<&'static RepeatedSyntax>)],
493 ) -> Self {
494 self.syntaxes = syntaxes
495 .iter()
496 .map(|s| CallableSyntax::new_static(s.0, s.1))
497 .collect::<Vec<CallableSyntax>>();
498 self
499 }
500
501 /// Sets the syntax specifications for this callable.
502 pub(crate) fn with_syntaxes<S: Into<Vec<CallableSyntax>>>(mut self, syntaxes: S) -> Self {

Callers 15

newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80
newMethod · 0.80

Calls 1

iterMethod · 0.80

Tested by 15

newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64
newMethod · 0.64