Add row conditions

This commit is contained in:
JT
2021-09-10 09:47:20 +12:00
parent b821b14987
commit bb6781a3b1
11 changed files with 195 additions and 22 deletions

View File

@ -15,6 +15,7 @@ pub enum Expr {
Call(Box<Call>),
ExternalCall(Vec<u8>, Vec<Vec<u8>>),
Operator(Operator),
RowCondition(VarId, Box<Expression>),
BinaryOp(Box<Expression>, Box<Expression>, Box<Expression>), //lhs, op, rhs
Subexpression(BlockId),
Block(BlockId),

View File

@ -277,6 +277,10 @@ impl Value {
Ok(current)
}
pub fn is_true(&self) -> bool {
matches!(self, Value::Bool { val: true, .. })
}
}
impl PartialEq for Value {