mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
make externally available the expression used for initializating a record field
This commit is contained in:
parent
88ef6cb5b6
commit
9fe7d8581f
2 changed files with 10 additions and 1 deletions
|
@ -36,6 +36,7 @@ class Expr;
|
|||
class ListExpr;
|
||||
class ZAMCompiler;
|
||||
|
||||
using ExprPtr = IntrusivePtr<Expr>;
|
||||
using ListExprPtr = IntrusivePtr<ListExpr>;
|
||||
|
||||
// The following tracks how to initialize a given record field.
|
||||
|
@ -48,6 +49,10 @@ public:
|
|||
|
||||
// Can initialization of the field be deferred?
|
||||
virtual bool IsDeferrable() const { return true; }
|
||||
|
||||
// Returns the expression evaluated to initialize the field, if any.
|
||||
// (Used for script optimization.)
|
||||
virtual ExprPtr InitExpr() const;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue