public virtual Differences VisitGoto(Goto goto1, Goto goto2){ Differences differences = new Differences(goto1, goto2); if (goto1 == null || goto2 == null){ if (goto1 != goto2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++; return differences; } Goto changes = (Goto)goto2.Clone(); Goto deletions = (Goto)goto2.Clone(); Goto insertions = (Goto)goto2.Clone(); Differences diff = this.VisitIdentifier(goto1.TargetLabel, goto2.TargetLabel); if (diff == null){Debug.Assert(false); return differences;} changes.TargetLabel = diff.Changes as Identifier; deletions.TargetLabel = diff.Deletions as Identifier; insertions.TargetLabel = diff.Insertions as Identifier; Debug.Assert(diff.Changes == changes.TargetLabel && diff.Deletions == deletions.TargetLabel && diff.Insertions == insertions.TargetLabel); 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 VisitGoto(Goto Goto) { if (Goto == null) return null; return base.VisitGoto((Goto)Goto.Clone()); }