Beispiel #1
0
        public override GreenNode VisitXmlEmptyElement(XmlEmptyElementSyntax.Green node)
        {
            bool anyChanges       = false;
            var  newLessThanToken = ((PunctuationSyntax.Green)Visit(node.LessThanToken));

            if (node.LessThanToken != newLessThanToken)
            {
                anyChanges = true;
            }

            var newName = ((XmlNameSyntax.Green)Visit(node.NameNode));

            if (node.NameNode != newName)
            {
                anyChanges = true;
            }

            var newAttributes = VisitList <GreenNode>(node.AttributesNode);

            if (node.AttributesNode != newAttributes.Node)
            {
                anyChanges = true;
            }

            var newSlashGreaterThanToken = ((PunctuationSyntax.Green)Visit(node.SlashGreaterThanToken));

            if (node.SlashGreaterThanToken != newSlashGreaterThanToken)
            {
                anyChanges = true;
            }

            if (anyChanges)
            {
                return(new XmlEmptyElementSyntax.Green(newLessThanToken, newName, newAttributes.Node, newSlashGreaterThanToken));
            }
            else
            {
                return(node);
            }
        }
Beispiel #2
0
 public virtual GreenNode VisitXmlEmptyElement(XmlEmptyElementSyntax.Green node)
 {
     return(VisitXmlNode(node));
 }