mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Merge topic/actor-system throug a squashed commit.
This commit is contained in:
parent
7a6f5020f6
commit
fe7e1ee7f0
466 changed files with 12559 additions and 9655 deletions
35
src/Expr.h
35
src/Expr.h
|
@ -44,7 +44,9 @@ typedef enum {
|
|||
EXPR_VECTOR_COERCE,
|
||||
EXPR_SIZE,
|
||||
EXPR_FLATTEN,
|
||||
#define NUM_EXPRS (int(EXPR_FLATTEN) + 1)
|
||||
EXPR_CAST,
|
||||
EXPR_IS,
|
||||
#define NUM_EXPRS (int(EXPR_IS) + 1)
|
||||
} BroExprTag;
|
||||
|
||||
extern const char* expr_name(BroExprTag t);
|
||||
|
@ -1044,6 +1046,37 @@ protected:
|
|||
DECLARE_SERIAL(RecordAssignExpr);
|
||||
};
|
||||
|
||||
class CastExpr : public UnaryExpr {
|
||||
public:
|
||||
CastExpr(Expr* op, BroType* t);
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
CastExpr() { }
|
||||
|
||||
Val* Eval(Frame* f) const override;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
|
||||
DECLARE_SERIAL(CastExpr);
|
||||
};
|
||||
|
||||
class IsExpr : public UnaryExpr {
|
||||
public:
|
||||
IsExpr(Expr* op, BroType* t);
|
||||
virtual ~IsExpr();
|
||||
|
||||
protected:
|
||||
friend class Expr;
|
||||
IsExpr() { }
|
||||
|
||||
Val* Fold(Val* v) const override;
|
||||
void ExprDescribe(ODesc* d) const override;
|
||||
DECLARE_SERIAL(IsExpr);
|
||||
|
||||
private:
|
||||
BroType* t;
|
||||
};
|
||||
|
||||
inline Val* Expr::ExprVal() const
|
||||
{
|
||||
if ( ! IsConst() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue