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); }
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())); }