SetSubNodes() public method

public SetSubNodes ( IEnumerable subNodes ) : SyntaxTreeNode
subNodes IEnumerable
return SyntaxTreeNode
        protected internal virtual SyntaxTreeNode Visit(SequenceNode node)
        {
            if (node == null) return null;

            var modifiedSubNodes = GetModifiedSubNodes(node);

            if (modifiedSubNodes == null)
                return node; //unmodified
            else
                return node.SetSubNodes(modifiedSubNodes); //subnodes were modified
        }
Exemplo n.º 2
0
        protected internal virtual SyntaxTreeNode Visit(SequenceNode node)
        {
            if (node == null)
            {
                return(null);
            }

            var modifiedSubNodes = GetModifiedSubNodes(node);

            if (modifiedSubNodes == null)
            {
                return(node); //unmodified
            }
            else
            {
                return(node.SetSubNodes(modifiedSubNodes)); //subnodes were modified
            }
        }