public static string ToInstructionString(this BooleanLogicOperator @operator) { return(@operator switch { BooleanLogicOperator.And => "AND", BooleanLogicOperator.Or => "OR", _ => throw ExhaustiveMatch.Failed(@operator) });
public BooleanLogicInstruction( Place resultPlace, BooleanLogicOperator @operator, Operand leftOperand, Operand rightOperand, Scope scope) : base(resultPlace, TextSpan.Covering(leftOperand.Span, rightOperand.Span), scope) { Operator = @operator; LeftOperand = leftOperand; RightOperand = rightOperand; }