Example #1
0
 internal override void RemoveChild(Node child)
 {
     if (_token_ == child)
     {
         _token_ = null;
         return;
     }
     if (_test_ == child)
     {
         _test_ = null;
         return;
     }
     if (_cases_.Contains(child))
     {
         _cases_.Remove(child);
         return;
     }
 }
Example #2
0
        public void SetToken(TSwitch node)
        {
            if (_token_ != null)
            {
                _token_.Parent(null);
            }

            if (node != null)
            {
                if (node.Parent() != null)
                {
                    node.Parent().RemoveChild(node);
                }

                node.Parent(this);
            }

            _token_ = node;
        }
 public virtual void CaseTSwitch(TSwitch node)
 {
     DefaultCase(node);
 }
Example #4
0
 public ASwitchStm(
         TSwitch _token_,
         PExp _test_,
         IList _cases_
 )
 {
     SetToken(_token_);
     SetTest(_test_);
     this._cases_ = new TypedList(new Cases_Cast(this));
     this._cases_.Clear();
     this._cases_.AddAll(_cases_);
 }
Example #5
0
 public override void CaseTSwitch(TSwitch node)
 {
     index = 25;
 }