public virtual Differences VisitEndFilter(EndFilter endFilter1, EndFilter endFilter2){ Differences differences = new Differences(endFilter1, endFilter2); if (endFilter1 == null || endFilter2 == null){ if (endFilter1 != endFilter2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } EndFilter changes = (EndFilter)endFilter2.Clone(); EndFilter deletions = (EndFilter)endFilter2.Clone(); EndFilter insertions = (EndFilter)endFilter2.Clone(); Differences diff = this.VisitExpression(endFilter1.Value, endFilter2.Value); if (diff == null){Debug.Assert(false); return differences;} changes.Value = diff.Changes as Expression; deletions.Value = diff.Deletions as Expression; insertions.Value = diff.Insertions as Expression; Debug.Assert(diff.Changes == changes.Value && diff.Deletions == deletions.Value && diff.Insertions == insertions.Value); differences.NumberOfDifferences += diff.NumberOfDifferences; differences.NumberOfSimilarities += diff.NumberOfSimilarities; if (differences.NumberOfDifferences == 0){ differences.Changes = null; differences.Deletions = null; differences.Insertions = null; }else{ differences.Changes = changes; differences.Deletions = deletions; differences.Insertions = insertions; } return differences; }
public override Statement VisitEndFilter(EndFilter endFilter) { if (endFilter == null) return null; return base.VisitEndFilter((EndFilter)endFilter.Clone()); }