Merge new instruction definitions #2

Merged
rowan.a.tl merged 21 commits from dev into main 2025-04-19 23:09:05 -05:00
2 changed files with 151 additions and 743 deletions
Showing only changes of commit eb2c033a98 - Show all commits

View File

@ -111,12 +111,17 @@ impl ToTokens for Extract {
true => quote! { true => quote! {
let result = #inner_func(#(#value_vars.clone()),*); let result = #inner_func(#(#value_vars.clone()),*);
if let Some(result) = result { if let Some(result) = result {
#inner_state.#inner_out_stack.extend(result.iter()); // Transforming the result vector into an iterator with .iter() was
// causing problems with the vector_string stack. Iterating this way
// fixes the problem.
for n in 0..result.len() {
#inner_state.#inner_out_stack.push(result[n].clone())
}
} else { } else {
#(#restore_values)* #(#restore_values)*
} }
}, },
false => quote! { false => quote! { // This arm is used most of the time
let result = #inner_func(#(#value_vars.clone()),*); let result = #inner_func(#(#value_vars.clone()),*);
if let Some(result) = result { if let Some(result) = result {
#inner_state.#inner_out_stack.push(result); #inner_state.#inner_out_stack.push(result);

File diff suppressed because it is too large Load Diff