Change pattern functions to call user function with keyword args (#6772)

* Change pattern functions to call user function with keyword args

* Fix KCL code to use unlabeled syntax

* Update generated output
This commit is contained in:
Jonathan Tran
2025-05-08 14:43:50 -04:00
committed by GitHub
parent 90cb26c6d9
commit b65ea8e0a9
8 changed files with 92 additions and 31 deletions

View File

@ -1324,7 +1324,7 @@ impl Node<CallExpressionKw> {
},
self.into(),
ctx.clone(),
exec_state.mod_local.pipe_value.clone().map(|v| Arg::new(v, callsite)),
exec_state.pipe_value().map(|v| Arg::new(v.clone(), callsite)),
);
match ctx.stdlib.get_either(fn_name) {
FunctionKind::Core(func) => {
@ -2194,7 +2194,7 @@ impl FunctionSource {
},
callsite,
ctx.clone(),
exec_state.mod_local.pipe_value.clone().map(|v| Arg::new(v, callsite)),
exec_state.pipe_value().map(|v| Arg::new(v.clone(), callsite)),
);
self.call_kw(fn_name, exec_state, ctx, args, callsite).await
} else {