diff options
| author | Henry <mail@henrygressmann.de> | 2026-05-02 21:14:02 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-05-02 21:19:54 +0200 |
| commit | ba1cf56464f8e5c3c7bcc2dc75f10aad2cd56e6b (patch) | |
| tree | dd0bef203b31c494f48e72c1169f2f50ae7b6d21 /crates/parser/src/visit.rs | |
| parent | d3c6b705a3b1035adda66a92131e9ddf59fb46ab (diff) | |
chore: add more tests, fix issues with import types, cleanup doom example
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src/visit.rs')
| -rw-r--r-- | crates/parser/src/visit.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/parser/src/visit.rs b/crates/parser/src/visit.rs index f8d5cfd..62db307 100644 --- a/crates/parser/src/visit.rs +++ b/crates/parser/src/visit.rs @@ -417,7 +417,12 @@ impl<'a, R: WasmModuleResources> wasmparser::VisitOperator<'a> for FunctionBuild // Reference Types fn visit_ref_null(&mut self, ty: wasmparser::HeapType) -> Self::Output { - self.instructions.push(Instruction::RefNull(convert_heaptype(ty))); + match convert_heaptype(ty) { + Ok(ty) => self.instructions.push(Instruction::RefNull(ty)), + Err(err) => { + self.error.get_or_insert(err); + } + }; } fn visit_typed_select_multi(&mut self, tys: Vec<wasmparser::ValType>) -> Self::Output { |
