wrap_boolean_assignment_rhs

Function wrap_boolean_assignment_rhs 

Source
pub(super) fn wrap_boolean_assignment_rhs(s: &str) -> String
Expand description

Rewrite Boolean-producing parenthesised comparisons to a Float-returning milkif(<cmp>, 1, 0) call. evalexpr is strictly typed: a (a > b) produces Boolean, which then dies on *///+ against a Float neighbour.

Fires on parens whose inner expression has one comparison and no commas — that’s enough to disambiguate from real function calls like milkif(a>b, c, d).