Skip to content

Commit

Permalink
added param value extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
lexa-diky committed May 30, 2024
1 parent 58fdc64 commit 3b4d7da
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/compiler/rst/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,18 @@ impl RstCompiler<'_> {
let function_binding = context.get_local_function(context_id, &function_name)
.ok_or(RstCompilerError::UnresolvedFunction { name: function_name.clone() })?;

function_binding.emits.iter().for_each(|emit| {
Self::build_bytes_into(function_binding.identifier, context, &emit.atoms, buffer).unwrap();
});
for emit in &function_binding.emits {
Self::build_bytes_into(function_binding.identifier, context, &emit.atoms, buffer)
.unwrap();
}

for param in params {
let mut param_buffer = ByteBuffer::new();
Self::build_bytes_into(context_id, context, &param.value, &mut param_buffer)
.unwrap();

// TODO bind param into function context
}

Ok(())
}
Expand Down

0 comments on commit 3b4d7da

Please sign in to comment.