From f7bb7f8deeca781bc73d30955d5fcc7fe0395bd5 Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Sun, 8 Dec 2024 14:20:23 -0800 Subject: [PATCH] Fix typo and improve comment --- core/translate/expr.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/translate/expr.rs b/core/translate/expr.rs index 4be4417cd..0ac834489 100644 --- a/core/translate/expr.rs +++ b/core/translate/expr.rs @@ -703,10 +703,12 @@ pub fn translate_expr( when_then_pairs, else_expr, } => { - // There's two forms of CASE, one which does quality against the then values: + // There's two forms of CASE, one which does quality against the when values: // CASE [expr] WHEN [value] ELSE [value] END // And one which evaluates a series of boolean predicates: // CASE (WHEN [bool_expr] THEN [value])+ END + // This just changes which sort of branching instruction to issue, after we + // generate the expression if needed. let return_label = program.allocate_label(); let mut next_case_label = program.allocate_label(); let base_reg = base.as_ref().map(|_| program.alloc_register());