Update symbol_declaration.rs

This commit is contained in:
Yanting Zhang 2022-08-31 21:27:10 +08:00
parent 766ed5eded
commit 9c918cb0ad
1 changed files with 2 additions and 0 deletions

View File

@ -305,6 +305,7 @@ impl<'a> SymbolDeclaration {
if json_names.len() != 0 { if json_names.len() != 0 {
for json_name in json_names { for json_name in json_names {
if json_name.len() != 0 {
let name = &json_name["text"].to_string(); let name = &json_name["text"].to_string();
let symbol = SymbolInfo::new(kind, IntValue::zero(width), json_name); let symbol = SymbolInfo::new(kind, IntValue::zero(width), json_name);
if !context.symbol.contains_key(name) { if !context.symbol.contains_key(name) {
@ -313,6 +314,7 @@ impl<'a> SymbolDeclaration {
info!("{} '{}' has been declared", kind, name); info!("{} '{}' has been declared", kind, name);
} }
} }
}
} }
} }
} }