Exemple #1
0
 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;
 }
Exemple #2
0
        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);
        }