public virtual Differences VisitThrow(Throw throw1, Throw throw2){ Differences differences = new Differences(throw1, throw2); if (throw1 == null || throw2 == null){ if (throw1 != throw2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } Throw changes = (Throw)throw2.Clone(); Throw deletions = (Throw)throw2.Clone(); Throw insertions = (Throw)throw2.Clone(); Differences diff = this.VisitExpression(throw1.Expression, throw2.Expression); if (diff == null){Debug.Assert(false); return differences;} changes.Expression = diff.Changes as Expression; deletions.Expression = diff.Deletions as Expression; insertions.Expression = diff.Insertions as Expression; Debug.Assert(diff.Changes == changes.Expression && diff.Deletions == deletions.Expression && diff.Insertions == insertions.Expression); 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; }