public override void VisitConditionalOrExpression(IConditionalOrExpression expr, IList <IStatement> context) { foreach (var csExpr in expr.OperatorOperands) { csExpr.Accept(this, context); } }
public override IAssignableExpression VisitConditionalOrExpression(IConditionalOrExpression expr, IList <IStatement> context) { return(new BinaryExpression { LeftOperand = ToSimpleExpression(expr.LeftOperand, context), Operator = BinaryOperator.Or, RightOperand = ToSimpleExpression(expr.RightOperand, context) }); }
protected CognitiveComplexityHintBase(ITreeNode node, DocumentOffset offset, int value) { _node = node; _offset = offset; Value = value; Description = node switch { IWhileStatement _ => "While-Statement (increases nesting)", ISwitchStatement _ => "Switch-Statement (increases nesting)", IDoStatement _ => "Do-While-Statement (increases nesting)", IIfStatement _ => "If-Statement (increases nesting)", IForStatement _ => "For-Statement (increases nesting)", IForeachStatement _ => "Foreach-Statement (increases nesting)", ICatchClause _ => "Catch-Clause (increases nesting)", IGotoStatement _ => "Goto-Statement", IBreakStatement _ => "Break-Statement", IConditionalOrExpression _ => "First/alternating conditional Expression", IConditionalAndExpression _ => "First/alternating conditional Expression", ICSharpStatement _ => "If-Statement (increases nesting)", ICSharpExpression _ => "Recursive Call", _ => throw new NotSupportedException(node.GetType().FullName) }; }