From 890d10cc4fd131ee27059e3c309ea38679293ab2 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sun, 16 Oct 2022 21:52:48 -0300 Subject: Finish step_in and step_out (VM core) --- src/pattern.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pattern.rs') diff --git a/src/pattern.rs b/src/pattern.rs index 6795481..2f7166a 100644 --- a/src/pattern.rs +++ b/src/pattern.rs @@ -50,9 +50,14 @@ impl Pattern { &mut frames, //&mut output, ); - let (pack, obj) = vm::Packer::new(interp, MAX_CALLS).deserialize(der)?; + let (mut packs, obj) = vm::Packer::new( + interp, + MAX_CALLS, + ).deserialize(der)?; // this should always be None debug_assert!(obj.is_none()); + debug_assert!(packs.len() == 1); + let pack = packs.pop().unwrap(); let de = De::deserialize(vm::Unpacker::new(pack, MAX_CALLS)); todo!() } -- cgit 1.4.1