Update symbol_declaration.rs
This commit is contained in:
parent
62700597e0
commit
aaf0ff373b
|
@ -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) {
|
||||||
|
@ -316,6 +317,7 @@ impl<'a> SymbolDeclaration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn gen_var_width(json: &JsonValue, dim_path: Vec<&str>) -> usize {
|
fn gen_var_width(json: &JsonValue, dim_path: Vec<&str>) -> usize {
|
||||||
let json_dims = Tools::match_tags(vec![json], dim_path);
|
let json_dims = Tools::match_tags(vec![json], dim_path);
|
||||||
|
|
Loading…
Reference in New Issue