public IfExpression( TextSpan span, DataType dataType, ExpressionSemantics semantics, IExpression condition, IBlockOrResult thenBlock, IElseClause?elseClause) : base(span, dataType, semantics) { Condition = condition; ThenBlock = thenBlock; ElseClause = elseClause; }
/// <summary> /// Convert without expecting any result value /// </summary> private void Convert(IBlockOrResult blockOrResult) { switch (blockOrResult) { default: throw ExhaustiveMatch.Failed(blockOrResult); case IBlockExpression exp: Convert((IExpression)exp); break; case IResultStatement statement: Convert((IStatement)statement); break; } }