mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
global_ids(): Include module names
Ad-hoc include module names in the global_ids() table. Table values will have the type_name field set to "module" and their key in the table is prefixed with "module " to avoid clashes with existing global identifiers shadowing module names (Management::Node being an existing example). Closes #3136
This commit is contained in:
parent
f6f9dd2620
commit
4cde1c3c3f
8 changed files with 85 additions and 12 deletions
|
@ -157,8 +157,6 @@ static int func_hdr_cond_epoch = 0;
|
|||
EnumType* cur_enum_type = nullptr;
|
||||
static ID* cur_decl_type_id = nullptr;
|
||||
|
||||
std::set<std::string> module_names;
|
||||
|
||||
static void parse_new_enum(void)
|
||||
{
|
||||
// Starting a new enum definition.
|
||||
|
@ -1357,7 +1355,7 @@ decl:
|
|||
TOK_MODULE TOK_ID ';'
|
||||
{
|
||||
current_module = $2;
|
||||
module_names.insert($2);
|
||||
zeek::detail::add_module($2);
|
||||
zeekygen_mgr->ModuleUsage(::filename, current_module);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue