diff --git a/Cargo.lock b/Cargo.lock index f27824f..ec97ffe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,7 +322,7 @@ dependencies = [ [[package]] name = "slang-rs" -version = "0.10.0" +version = "0.11.0" dependencies = [ "num-bigint", "num-traits", diff --git a/Cargo.toml b/Cargo.toml index 345d515..8c2e259 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slang-rs" -version = "0.10.0" +version = "0.11.0" edition = "2021" license = "Apache-2.0" description = "Rust bindings for the Slang Verilog parser" diff --git a/src/extract.rs b/src/extract.rs index ea2e755..019b8db 100644 --- a/src/extract.rs +++ b/src/extract.rs @@ -54,6 +54,9 @@ pub fn extract_ports_from_value( for member in members { if member["kind"] == "Instance" { let module_name = member["name"].as_str().unwrap(); + if module_name.is_empty() { + continue; + } let mut ports = Vec::new(); if let Some(instance_body_members) = member["body"]["members"].as_array() { for instance_member in instance_body_members {