mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Make options redef-able by default.
This commit is contained in:
parent
26ea1999ec
commit
c34fbee0d1
4 changed files with 22 additions and 1 deletions
16
src/ID.cc
16
src/ID.cc
|
@ -294,6 +294,22 @@ void ID::RemoveAttr(attr_tag a)
|
|||
}
|
||||
}
|
||||
|
||||
void ID::SetOption()
|
||||
{
|
||||
if ( is_option )
|
||||
return;
|
||||
|
||||
is_option = true;
|
||||
|
||||
// option implied redefinable
|
||||
if ( ! IsRedefinable() )
|
||||
{
|
||||
attr_list* attr = new attr_list;
|
||||
attr->append(new Attr(ATTR_REDEF));
|
||||
AddAttrs(new Attributes(attr, Type(), false));
|
||||
}
|
||||
}
|
||||
|
||||
void ID::EvalFunc(Expr* ef, Expr* ev)
|
||||
{
|
||||
Expr* arg1 = new ConstExpr(val->Ref());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue