MCPcopy Create free account
hub / github.com/aspizu/goboscript / coerce_condition

Function coerce_condition

src/codegen/input.rs:63–68  ·  view source on GitHub ↗
(expr: &Expr)

Source from the content-addressed store, hash-verified

61}
62
63pub fn coerce_condition(expr: &Expr) -> Expr {
64 if is_expr_boolean(expr) {
65 return expr.clone();
66 }
67 BinOp::Eq.to_expr(0..0, expr.clone(), Value::from(true).to_expr(0..0))
68}
69
70impl<T> Sb3<T>
71where T: Write + Seek

Callers 4

branchMethod · 0.85
untilMethod · 0.85
un_opMethod · 0.85
bin_opMethod · 0.85

Calls 2

is_expr_booleanFunction · 0.85
to_exprMethod · 0.80

Tested by

no test coverage detected