Home | History | Annotate | Download | only in PrettyPatch

Lines Matching defs:Match

3   Match = Struct.new(:start_in_old, :start_in_new, :size)
4 class Match
39 # an empty match at the end forces the loop below to handle the unmatched tails
41 matches << Match.new(@old_words.length, @new_words.length, 0)
43 matches.each_with_index do |match, i|
44 match_starts_at_current_position_in_old = (position_in_old == match.start_in_old)
45 match_starts_at_current_position_in_new = (position_in_new == match.start_in_new)
63 position_in_old, match.start_in_old,
64 position_in_new, match.start_in_new)
67 if match.size != 0
69 match.start_in_old, match.end_in_old,
70 match.start_in_new, match.end_in_new)
74 position_in_old = match.end_in_old
75 position_in_new = match.end_in_new
88 match = find_match(start_in_old, end_in_old, start_in_new, end_in_new)
89 if match
90 if start_in_old < match.start_in_old and start_in_new < match.start_in_new
92 start_in_old, match.start_in_old, start_in_new, match.start_in_new, matching_blocks)
94 matching_blocks << match
95 if match.end_in_old < end_in_old and match.end_in_new < end_in_new
97 match.end_in_old, end_in_old, match.end_in_new, end_in_new, matching_blocks)
135 return (best_match_size != 0 ? Match.new(best_match_in_old, best_match_in_new, best_match_size) : nil)