Parsing, semantic analysis, and lowering for and, or, not. (#2897)

Lowering for `and` and `or` is not yet complete because `Branch` lowering isn't done yet.
This commit is contained in:
Richard Smith
2023-06-14 13:03:13 -07:00
committed by GitHub
parent 8b1e820848
commit 06ce3b0161
28 changed files with 470 additions and 55 deletions
@@ -13,9 +13,7 @@ auto SemanticsHandleIfExpressionIf(SemanticsContext& context,
context.node_stack().Push(if_node);
// Convert the condition to `bool`.
cond_value_id = context.ImplicitAsRequired(
if_node, cond_value_id,
context.CanonicalizeType(SemanticsNodeId::BuiltinBoolType));
cond_value_id = context.ImplicitAsBool(if_node, cond_value_id);
// Stop emitting the current block. We'll add some branch instructions to it
// later, but we don't want it on the stack any more.