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

Method exec

core/tests/testutils/callables/out_sep_end_cmd.rs:63–82  ·  view source on GitHub ↗
(&self, scope: Scope<'_>)

Source from the content-addressed store, hash-verified

61 }
62
63 fn exec(&self, scope: Scope<'_>) -> CallResult<()> {
64 let mut output = self.output.borrow_mut();
65
66 let (formatted, present, sep) = super::format_vararg(&scope, 0);
67 output.push_str(&formatted);
68 if present {
69 output.push(' ');
70 output.push_str(&sep.to_string());
71 output.push(' ');
72 }
73 output.push('\n');
74
75 let (formatted, present, sep) = super::format_vararg(&scope, 2);
76 assert!(present, "Second argument must be present");
77 assert_eq!(ArgSep::End, sep, "No more arguments expected");
78 output.push_str(&formatted);
79 output.push('\n');
80
81 Ok(())
82 }
83}

Callers

nothing calls this directly

Calls 3

format_varargFunction · 0.85
push_strMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected