3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-08 23:23:25 +00:00

Merge pull request #1811 from PeterCrozier/typedef_scope

Support module/package/interface/block scope for typedef names.
This commit is contained in:
N. Engelhardt 2020-03-30 13:55:39 +02:00 committed by GitHub
commit d5e2061687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 89 additions and 44 deletions

View file

@ -52,7 +52,6 @@ static void add_package_types(std::map<std::string, AST::AstNode *> &user_types,
{
// prime the parser's user type lookup table with the package qualified names
// of typedefed names in the packages seen so far.
user_types.clear();
for (const auto &pkg : package_list) {
log_assert(pkg->type==AST::AST_PACKAGE);
for (const auto &node: pkg->children) {
@ -62,6 +61,8 @@ static void add_package_types(std::map<std::string, AST::AstNode *> &user_types,
}
}
}
user_type_stack.clear();
user_type_stack.push_back(new UserTypeMap());
}
struct VerilogFrontend : public Frontend {