Skip to content

Commit f84b823

Browse files
committed
systemverilog-plugin: refactor
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
1 parent fa09d0f commit f84b823

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

systemverilog-plugin/UhdmAst.cc

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,16 +1970,12 @@ void UhdmAst::process_module()
19701970
current_node->children.insert(current_node->children.begin(), typeNode);
19711971
auto old_top = shared.current_top_node;
19721972
shared.current_top_node = module_node;
1973-
visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet}, obj_h, [&](AST::AstNode *node) {
1974-
if (node) {
1975-
add_or_replace_child(module_node, node);
1976-
}
1977-
});
1978-
visit_one_to_many({vpiInterface, vpiModule, vpiPort, vpiGenScopeArray, vpiContAssign, vpiTaskFunc}, obj_h, [&](AST::AstNode *node) {
1979-
if (node) {
1980-
add_or_replace_child(module_node, node);
1981-
}
1982-
});
1973+
visit_one_to_many({vpiVariables, vpiNet, vpiArrayNet, vpiInterface, vpiModule, vpiPort, vpiGenScopeArray, vpiContAssign, vpiTaskFunc}, obj_h,
1974+
[&](AST::AstNode *node) {
1975+
if (node) {
1976+
add_or_replace_child(module_node, node);
1977+
}
1978+
});
19831979
make_cell(obj_h, current_node, module_node);
19841980
shared.current_top_node = old_top;
19851981
}

0 commit comments

Comments
 (0)