Пример #1
0
 public void ReplaceBy(Node node)
 {
     if(parent_node != null)
     {
     parent_node.ReplaceChild(this, node);
     }
 }
Пример #2
0
 internal override void RemoveChild(Node child)
 {
     if ( _mult_ == child )
     {
     _mult_ = null;
     return;
     }
 }
Пример #3
0
        protected Node CloneNode(Node node)
        {
            if(node != null)
            {
            return (Node) node.Clone();
            }

            return null;
        }
Пример #4
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
 }
Пример #5
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_func_ == oldChild )
     {
     SetKeywordFunc ((TKeywordFunc) newChild);
     return;
     }
     if ( _operator_opening_parenthesis_ == oldChild )
     {
     SetOperatorOpeningParenthesis ((TOperatorOpeningParenthesis) newChild);
     return;
     }
     if ( _operator_closing_parenthesis_ == oldChild )
     {
     SetOperatorClosingParenthesis ((TOperatorClosingParenthesis) newChild);
     return;
     }
     if ( _type_ == oldChild )
     {
     SetType ((PType) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Пример #6
0
        public virtual Object GetIn(Node node)
        {
            if(inhash == null)
            {
            return null;
            }

            return inhash[node];
        }
Пример #7
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_func_ == child )
     {
     _keyword_func_ = null;
     return;
     }
     if ( _operator_opening_parenthesis_ == child )
     {
     _operator_opening_parenthesis_ = null;
     return;
     }
     if ( _operator_closing_parenthesis_ == child )
     {
     _operator_closing_parenthesis_ = null;
     return;
     }
     if ( _type_ == child )
     {
     _type_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Пример #8
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_func_ == child )
     {
     _keyword_func_ = null;
     return;
     }
     if ( _identifier_ == child )
     {
     _identifier_ = null;
     return;
     }
     if ( _operator_opening_parenthesis_ == child )
     {
     _operator_opening_parenthesis_ = null;
     return;
     }
     if ( _parameterlist_ == child )
     {
     _parameterlist_ = null;
     return;
     }
     if ( _operator_closing_parenthesis_ == child )
     {
     _operator_closing_parenthesis_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Пример #9
0
 public virtual void DefaultOut(Node node)
 {
 }
Пример #10
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_if_ == child )
     {
     _keyword_if_ = null;
     return;
     }
     if ( _ifexpr_ == child )
     {
     _ifexpr_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Пример #11
0
 internal abstract void ReplaceChild(Node oldChild, Node newChild);
Пример #12
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _ifelse_ == oldChild )
     {
     SetIfelse ((PIfelse) newChild);
     return;
     }
 }
Пример #13
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _test_ == oldChild )
     {
     SetTest ((PTest) newChild);
     return;
     }
 }
Пример #14
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _function_ == oldChild )
     {
     SetFunction ((PFunction) newChild);
     return;
     }
 }
Пример #15
0
 internal override void RemoveChild(Node child)
 {
     if ( _function_ == child )
     {
     _function_ = null;
     return;
     }
 }
Пример #16
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_func_ == oldChild )
     {
     SetKeywordFunc ((TKeywordFunc) newChild);
     return;
     }
     if ( _identifier_ == oldChild )
     {
     SetIdentifier ((TIdentifier) newChild);
     return;
     }
     if ( _operator_opening_parenthesis_ == oldChild )
     {
     SetOperatorOpeningParenthesis ((TOperatorOpeningParenthesis) newChild);
     return;
     }
     if ( _parameterlist_ == oldChild )
     {
     SetParameterlist ((PParameterlist) newChild);
     return;
     }
     if ( _operator_closing_parenthesis_ == oldChild )
     {
     SetOperatorClosingParenthesis ((TOperatorClosingParenthesis) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Пример #17
0
 internal void Parent(Node parent_node)
 {
     this.parent_node = parent_node;
 }
Пример #18
0
        protected string ToString(Node node)
        {
            if(node != null)
            {
            return node.ToString();
            }

            return "";
        }
Пример #19
0
 internal abstract void RemoveChild(Node child);
Пример #20
0
        public virtual void SetOut(Node node, Object outobj)
        {
            if(this.outhash == null)
            {
            this.outhash = new Hashtable(1);
            }

            if(outobj != null)
            {
            this.outhash[node] = outobj;
            }
            else
            {
            this.outhash.Remove(node);
            }
        }
Пример #21
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_if_ == oldChild )
     {
     SetKeywordIf ((TKeywordIf) newChild);
     return;
     }
     if ( _ifexpr_ == oldChild )
     {
     SetIfexpr ((PIfexpr) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Пример #22
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _mult_ == oldChild )
     {
     SetMult ((PMult) newChild);
     return;
     }
 }
Пример #23
0
        public virtual void SetIn(Node node, Object inobj)
        {
            if(this.inhash == null)
            {
            this.inhash = new Hashtable(1);
            }

            if(inobj != null)
            {
            this.inhash[node] = inobj;
            }
            else
            {
            this.inhash.Remove(node);
            }
        }
Пример #24
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _add_ == oldChild )
     {
     SetAdd ((PAdd) newChild);
     return;
     }
 }
Пример #25
0
 public virtual void DefaultIn(Node node)
 {
 }
Пример #26
0
 internal override void RemoveChild(Node child)
 {
     if ( _if_ == child )
     {
     _if_ = null;
     return;
     }
     if ( _elif_ == child )
     {
     _elif_ = null;
     return;
     }
     if ( _else_ == child )
     {
     _else_ = null;
     return;
     }
 }
Пример #27
0
 public virtual void DefaultCase(Node node)
 {
 }
Пример #28
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _if_ == oldChild )
     {
     SetIf ((PIf) newChild);
     return;
     }
     if ( _elif_ == oldChild )
     {
     SetElif ((PElif) newChild);
     return;
     }
     if ( _else_ == oldChild )
     {
     SetElse ((PElse) newChild);
     return;
     }
 }
Пример #29
0
        public virtual Object GetOut(Node node)
        {
            if(outhash == null)
            {
            return null;
            }

            return outhash[node];
        }
Пример #30
0
 internal override void RemoveChild(Node child)
 {
 }