mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
allow explicitly marking an identifier as equivalent to special '_' identifier
This commit is contained in:
parent
c49918ba8b
commit
9bfe18473d
2 changed files with 5 additions and 0 deletions
2
src/ID.h
2
src/ID.h
|
@ -100,6 +100,8 @@ public:
|
||||||
|
|
||||||
void SetOption();
|
void SetOption();
|
||||||
bool IsOption() const { return is_option; }
|
bool IsOption() const { return is_option; }
|
||||||
|
|
||||||
|
void SetBlank() { is_blank = true; }
|
||||||
bool IsBlank() const { return is_blank; };
|
bool IsBlank() const { return is_blank; };
|
||||||
|
|
||||||
void SetEnumConst() { is_enum_const = true; }
|
void SetEnumConst() { is_enum_const = true; }
|
||||||
|
|
|
@ -741,6 +741,9 @@ IDPtr Reducer::GenLocal(const IDPtr& orig) {
|
||||||
local_id->SetType(orig->GetType());
|
local_id->SetType(orig->GetType());
|
||||||
local_id->SetAttrs(orig->GetAttrs());
|
local_id->SetAttrs(orig->GetAttrs());
|
||||||
|
|
||||||
|
if ( orig->IsBlank() )
|
||||||
|
local_id->SetBlank();
|
||||||
|
|
||||||
if ( orig->GetOptInfo()->IsTemp() )
|
if ( orig->GetOptInfo()->IsTemp() )
|
||||||
local_id->GetOptInfo()->SetTemp();
|
local_id->GetOptInfo()->SetTemp();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue