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

Method with_dynamic_syntax

core/src/callable.rs:508–517  ·  view source on GitHub ↗

Sets the syntax specifications for this callable.

(
        self,
        syntaxes: Vec<(Vec<SingularArgSyntax>, Option<RepeatedSyntax>)>,
    )

Source from the content-addressed store, hash-verified

506
507 /// Sets the syntax specifications for this callable.
508 pub(crate) fn with_dynamic_syntax(
509 self,
510 syntaxes: Vec<(Vec<SingularArgSyntax>, Option<RepeatedSyntax>)>,
511 ) -> Self {
512 let syntaxes = syntaxes
513 .into_iter()
514 .map(|s| CallableSyntax::new_dynamic(s.0, s.1))
515 .collect::<Vec<CallableSyntax>>();
516 self.with_syntaxes(syntaxes)
517 }
518
519 /// Sets the category for this callable. All callables with the same category name will be
520 /// grouped together in help messages.

Callers 2

declare_callableFunction · 0.80
newMethod · 0.80

Calls 1

with_syntaxesMethod · 0.80

Tested by

no test coverage detected