mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Add &ordered attribute for tables/sets
This commit is contained in:
parent
e3682a09e0
commit
bd7df9e2bf
9 changed files with 56 additions and 6 deletions
|
@ -40,6 +40,7 @@ const char* attr_name(AttrTag t)
|
|||
"&deprecated",
|
||||
"&is_assigned",
|
||||
"&is_used",
|
||||
"&ordered",
|
||||
};
|
||||
|
||||
return attr_names[int(t)];
|
||||
|
@ -624,6 +625,11 @@ void Attributes::CheckAttr(Attr* a)
|
|||
break;
|
||||
}
|
||||
|
||||
case ATTR_ORDERED:
|
||||
if ( type->Tag() != TYPE_TABLE )
|
||||
Error("&ordered only applicable to tables");
|
||||
break;
|
||||
|
||||
default:
|
||||
BadTag("Attributes::CheckAttr", attr_name(a->Tag()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue