mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
GH-2034: Store module names and use them in lookups for ifdef
This commit is contained in:
parent
686e740bbe
commit
1870d26684
6 changed files with 88 additions and 4 deletions
|
@ -156,6 +156,8 @@ 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.
|
||||
|
@ -1269,6 +1271,7 @@ decl:
|
|||
TOK_MODULE TOK_ID ';'
|
||||
{
|
||||
current_module = $2;
|
||||
module_names.insert($2);
|
||||
zeekygen_mgr->ModuleUsage(::filename, current_module);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue