mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
libexpr: Split out MakeBinOpMembers from MakeBinOp
This commit is contained in:
parent
73d3ab05b6
commit
e282175f48
1 changed files with 33 additions and 30 deletions
|
|
@ -574,9 +574,7 @@ struct ExprOpNot : Expr
|
|||
COMMON_METHODS
|
||||
};
|
||||
|
||||
#define MakeBinOp(name, s) \
|
||||
struct name : Expr \
|
||||
{ \
|
||||
#define MakeBinOpMembers(name, s) \
|
||||
PosIdx pos; \
|
||||
Expr *e1, *e2; \
|
||||
name(Expr * e1, Expr * e2) \
|
||||
|
|
@ -603,9 +601,14 @@ struct ExprOpNot : Expr
|
|||
PosIdx getPos() const override \
|
||||
{ \
|
||||
return pos; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define MakeBinOp(name, s) \
|
||||
struct name : Expr \
|
||||
{ \
|
||||
MakeBinOpMembers(name, s) \
|
||||
};
|
||||
|
||||
MakeBinOp(ExprOpEq, "==");
|
||||
MakeBinOp(ExprOpNEq, "!=");
|
||||
MakeBinOp(ExprOpAnd, "&&");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue