Method
func_params
(
&mut self,
resolve: &Resolve,
func: &Function,
interface: Option<&WorldKey>,
in_import: bool,
imports: &mut BTreeSet<String>,
has_self: bool,
Source from the content-addressed store, hash-verified
| 1406 | |
| 1407 | #[expect(clippy::too_many_arguments, reason = "required context for codegen")] |
| 1408 | fn func_params( |
| 1409 | &mut self, |
| 1410 | resolve: &Resolve, |
| 1411 | func: &Function, |
| 1412 | interface: Option<&WorldKey>, |
| 1413 | in_import: bool, |
| 1414 | imports: &mut BTreeSet<String>, |
| 1415 | has_self: bool, |
| 1416 | prefix: &str, |
| 1417 | ) -> String { |
| 1418 | func.params |
| 1419 | .iter() |
| 1420 | .skip(if has_self { 1 } else { 0 }) |
| 1421 | .map(|Param { name, ty, .. }| { |
| 1422 | let name = name.to_lower_camel_case(); |
| 1423 | let ty = self.type_name(resolve, *ty, interface, in_import, imports); |
| 1424 | format!("{prefix}{name} {ty}") |
| 1425 | }) |
| 1426 | .collect::<Vec<_>>() |
| 1427 | .join(", ") |
| 1428 | } |
| 1429 | |
| 1430 | fn func_results( |
| 1431 | &mut self, |
Tested by
no test coverage detected