public SwitchStatement MakeSwitchStatement(Scope scope, IExpression expression, ICaseClauseList caseClauses) { var expr = (Expression)expression; foreach (var c in caseClauses) { if (!c.IsDefault) { c.Comparison = MakeSameExpressionInternal(expr, c.Expression); c.Comparison.AddUser(c); } } var n = new SwitchStatement(expr, caseClauses); return n; }
public SwitchStatement MakeSwitchStatement(Scope scope, IExpression expression, ICaseClauseList caseClauses) { var expr = (Expression)expression; foreach (var c in caseClauses) { if (!c.IsDefault) { c.Comparison = MakeSameExpressionInternal(expr, c.Expression); c.Comparison.AddUser(c); } } var n = new SwitchStatement(expr, caseClauses); return(n); }