Formats variable argument `i` in `Scope` and returns the formatted argument, whether the argument was present, and the separator that was found.
(scope: &Scope<'_>, i: u8)
| 109 | /// Formats variable argument `i` in `Scope` and returns the formatted argument, whether the |
| 110 | /// argument was present, and the separator that was found. |
| 111 | fn format_vararg(scope: &Scope<'_>, i: u8) -> (String, bool, ArgSep) { |
| 112 | match scope.get_type(i) { |
| 113 | VarArgTag::Immediate(sep, etype) => { |
| 114 | let formatted = format_arg(scope, i + 1, etype); |
| 115 | (format!("{}{}", formatted, etype.annotation()), true, sep) |
| 116 | } |
| 117 | VarArgTag::Missing(sep) => ("()".to_owned(), false, sep), |
| 118 | VarArgTag::Pointer(sep) => { |
| 119 | let typed_ptr = scope.get_ref(i + 1); |
| 120 | (typed_ptr.to_string(), true, sep) |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Registers all test-only callables into `upcalls_by_name`. |
| 126 | pub(super) fn register_all( |