Esempio n. 1
0
        public override Exprent Copy()
        {
            SwitchExprent          swExpr        = new SwitchExprent(value.Copy(), bytecode);
            List <List <Exprent> > lstCaseValues = new List <List <Exprent> >();

            foreach (List <Exprent> lst in caseValues)
            {
                lstCaseValues.Add(new List <Exprent>(lst));
            }
            swExpr.SetCaseValues(lstCaseValues);
            return(swExpr);
        }
Esempio n. 2
0
        public override bool Equals(object o)
        {
            if (o == this)
            {
                return(true);
            }
            if (!(o is SwitchExprent))
            {
                return(false);
            }
            SwitchExprent sw = (SwitchExprent)o;

            return(InterpreterUtil.EqualObjects(value, sw.GetValue()));
        }