@@ -119,6 +119,11 @@ public Document WithRoot(Xml.Tag newRoot)
119119
120120 public string Eof => eof ;
121121
122+ public Document WithEof ( string newEof )
123+ {
124+ return newEof == eof ? this : new Document ( id , sourcePath , prefix , markers , charsetName , charsetBomMarked , checksum , fileAttributes , prolog , root , newEof ) ;
125+ }
126+
122127 public bool Equals ( Rewrite . Core . Tree ? other )
123128 {
124129 return other is Document && other . Id == Id ;
@@ -375,6 +380,11 @@ public Tag WithMarkers(Markers newMarkers)
375380
376381 public string Name => name ;
377382
383+ public Tag WithName ( string newName )
384+ {
385+ return newName == name ? this : new Tag ( id , prefix , markers , newName , attributes , content , closingTag , beforeTagDelimiterPrefix ) ;
386+ }
387+
378388 public IList < Xml . Attribute > Attributes => attributes ;
379389
380390 public Tag WithAttributes ( IList < Xml . Attribute > newAttributes )
@@ -384,6 +394,11 @@ public Tag WithAttributes(IList<Xml.Attribute> newAttributes)
384394
385395 public IList < Content > ? Content => content ;
386396
397+ public Tag WithContent ( IList < Content > ? newContent )
398+ {
399+ return newContent == content ? this : new Tag ( id , prefix , markers , name , attributes , newContent , closingTag , beforeTagDelimiterPrefix ) ;
400+ }
401+
387402 public Closing ? ClosingTag => closingTag ;
388403
389404 public Tag WithClosingTag ( Closing ? newClosingTag )
@@ -1008,6 +1023,11 @@ public JspDirective WithBeforeTypePrefix(string newBeforeTypePrefix)
10081023
10091024 public string Type => type ;
10101025
1026+ public JspDirective WithType ( string newType )
1027+ {
1028+ return newType == type ? this : new JspDirective ( id , prefix , markers , beforeTypePrefix , newType , attributes , beforeDirectiveEndPrefix ) ;
1029+ }
1030+
10111031 public IList < Xml . Attribute > Attributes => attributes ;
10121032
10131033 public JspDirective WithAttributes ( IList < Xml . Attribute > newAttributes )
0 commit comments