mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +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
19
src/Var.h
19
src/Var.h
|
@ -17,23 +17,30 @@ class ListVal;
|
|||
|
||||
typedef enum { VAR_REGULAR, VAR_CONST, VAR_REDEF, VAR_OPTION, } decl_type;
|
||||
|
||||
extern void add_global(ID* id, IntrusivePtr<BroType> t, init_class c,
|
||||
IntrusivePtr<Expr> init, attr_list* attr, decl_type dt);
|
||||
extern void add_global(ID* id,
|
||||
IntrusivePtr<BroType> t,
|
||||
init_class c,
|
||||
IntrusivePtr<Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr,
|
||||
decl_type dt);
|
||||
|
||||
extern IntrusivePtr<Stmt> add_local(IntrusivePtr<ID> id,
|
||||
IntrusivePtr<BroType> t, init_class c,
|
||||
IntrusivePtr<Expr> init, attr_list* attr,
|
||||
IntrusivePtr<BroType> t,
|
||||
init_class c,
|
||||
IntrusivePtr<Expr> init,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr,
|
||||
decl_type dt);
|
||||
|
||||
extern IntrusivePtr<Expr> add_and_assign_local(IntrusivePtr<ID> id,
|
||||
IntrusivePtr<Expr> init,
|
||||
IntrusivePtr<Val> val = nullptr);
|
||||
|
||||
extern void add_type(ID* id, IntrusivePtr<BroType> t, attr_list* attr);
|
||||
extern void add_type(ID* id, IntrusivePtr<BroType> t,
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attr);
|
||||
|
||||
extern void begin_func(ID* id, const char* module_name, function_flavor flavor,
|
||||
bool is_redef, IntrusivePtr<FuncType> t,
|
||||
attr_list* attrs = nullptr);
|
||||
std::unique_ptr<std::vector<IntrusivePtr<Attr>>> attrs = nullptr);
|
||||
|
||||
extern void end_func(IntrusivePtr<Stmt> body);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue