mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Switch parsing to use vector<IntrusivePtr<Attr>> from attr_list
This allows improved passing/storing of Attr references to Exprs, TypeDecl, Scope, etc.
This commit is contained in:
parent
ce6f69cd19
commit
8b6de5852c
10 changed files with 194 additions and 239 deletions
|
@ -840,7 +840,7 @@ bool check_built_in_call(BuiltinFunc* f, CallExpr* call)
|
|||
|
||||
// Gets a function's priority from its Scope's attributes. Errors if it sees any
|
||||
// problems.
|
||||
static int get_func_priority(const attr_list& attrs)
|
||||
static int get_func_priority(const std::vector<IntrusivePtr<Attr>>& attrs)
|
||||
{
|
||||
int priority = 0;
|
||||
|
||||
|
@ -883,7 +883,7 @@ function_ingredients::function_ingredients(IntrusivePtr<Scope> scope, IntrusiveP
|
|||
this->scope = std::move(scope);
|
||||
id = {NewRef{}, this->scope->ScopeID()};
|
||||
|
||||
auto attrs = this->scope->Attrs();
|
||||
const auto& attrs = this->scope->Attrs();
|
||||
|
||||
priority = (attrs ? get_func_priority(*attrs) : 0);
|
||||
this->body = std::move(body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue