fn equality_expr(&mut self) -> WeldResult<Box<Expr>> {
        let mut res = self.comparison_expr()?;
        // Unlike other expressions, we only allow one operator here; prevents stuff like a==b==c
        if *self.peek() == TEqualEqual || *self.peek() == TNotEqual {
            let token = self.next();
            let right = self.comparison_expr()?;
            if *token == TEqualEqual {
                res = expr_box(
                    BinOp {
                        kind: Equal,
                        left: res,
                        right,
                    },
                    Annotations::new(),
                )
            } else {
                res = expr_box(
                    BinOp {
                        kind: NotEqual,
                        left: res,
                        right,
                    },
                    Annotations::new(),
                )
            }
        }
        Ok(res)
    }
Parse an == or != expression (for operator precedence).
weld/src/syntax/parser.rs