public virtual bool VisitSwitchSection(SwitchSection switchSection, object d)
 {
     if ((switchSection == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((switchSection.SwitchLabels == null)) {
         return SetFailure();
     }
     if(switchSection.GetType() != d.GetType()) {return SetFailure();}
     var data = (SwitchSection)d;
     if (!IsMatch(switchSection, data)) {
         return SetFailure();
     }
     if (switchSection.SwitchLabels.Count == data.SwitchLabels.Count) {
     for (int i=0; i<switchSection.SwitchLabels.Count;i++) {
         CaseLabel o = switchSection.SwitchLabels[i];
         if(o == null){return SetFailure();}
         if((bool)o.AcceptVisitor(this, data.SwitchLabels[i]) == false) return SetFailure();
     }			}			else { return SetFailure(); }
     return switchSection.AcceptChildren(this, d);
 }
Beispiel #2
0
 public virtual object VisitSwitchSection(SwitchSection switchSection, object data)
 {
     Debug.Assert((switchSection != null));
     Debug.Assert((switchSection.SwitchLabels != null));
     foreach (CaseLabel o in switchSection.SwitchLabels) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     return switchSection.AcceptChildren(this, data);
 }
Beispiel #3
0
 public override object VisitSwitchSection (SwitchSection node, object data)
 {
     node.SwitchLabels.ForEach (l => l.AcceptVisitor (this, null));
     Indent ();
     node.AcceptChildren (this, null);
     Outdent ();
     return null;
 }