Lines Matching full:possible
231 var possible []MatchRanges
234 …k || (previous != nil && tgtNode.tokens.Start > previous.tokens.End) || !extendsAny(sr, possible) {
235 for _, r := range possible {
238 possible = possible[:0]
246 // Maps index within `possible` to the slice of ranges extended by a new range
248 // Go over the set of source ranges growing lists of `possible` match ranges.
258 // Grow or extend each abutting `possible` match range.
259 for i, p := range possible {
263 possible[i] = append(possible[i], r)
264 extended[i] = &possible[i]
268 // Did not abut any existing ranges, start a new `possible` match range.
271 possible = append(possible, mrs)
272 extended[len(possible)-1] = &possible[len(possible)-1]
275 if len(extended) < len(possible) {
277 for i := 0; i < len(possible); {
280 i++ // Keep in `possible` and advance to next index.
283 p1 := possible[i]
284 found := false // whether found as subrange of another `possible` match.
294 // Finished -- delete from `possible` and continue from same index.
295 possible = append(possible[:i], possible[i+1:]...)
300 // At end of file, terminate all `possible` match ranges.
301 for i := 0; i < len(possible); i++ {
302 p1 := possible[i]
303 found := false // whether found as subrange of another `possible` match.
304 for j := i + 1; j < len(possible); {
305 p2 := possible[j]
308 possible = append(possible[:j], possible[j+1:]...)