From 0014bcbf9d792c5b2d3a2baab159f77e57d04378 Mon Sep 17 00:00:00 2001 From: Tyler K Date: Tue, 29 Oct 2024 12:44:23 -0700 Subject: [PATCH] Use parameter name instead of terminusArgs --- tool/src/demo_gen/terminus.rs | 4 ++-- tool/templates/demo_gen/terminus.js.jinja | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tool/src/demo_gen/terminus.rs b/tool/src/demo_gen/terminus.rs index 6d456936e..d0cd6396e 100644 --- a/tool/src/demo_gen/terminus.rs +++ b/tool/src/demo_gen/terminus.rs @@ -250,7 +250,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> { self.out_param_collision.insert(param_name, n); let out_param = OutParam { - param_name: p, + param_name: p.clone(), label, type_name: type_name.clone(), type_use, @@ -261,7 +261,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> { let param_info = ParamInfo { // Grab arguments without having to name them - js: format!("terminusArgs[{}]", self.terminus_info.out_params.len() - 1), + js: p, }; node.params.push(param_info); diff --git a/tool/templates/demo_gen/terminus.js.jinja b/tool/templates/demo_gen/terminus.js.jinja index f9b00cdf0..1a8f638b3 100644 --- a/tool/templates/demo_gen/terminus.js.jinja +++ b/tool/templates/demo_gen/terminus.js.jinja @@ -3,7 +3,6 @@ export function {{function_name}}( {{param.param_name}}{% if typescript %}: {{param.type_name}}{% endif %}{% if !loop.last %}, {% endif %} {%- endfor -%} ){% if typescript %};{% else %} { - var terminusArgs = arguments; return {{node_call_stack|indent(4)}}; } {%- endif %} \ No newline at end of file