Remove unnecessary loop label

This commit is contained in:
Junegunn Choi 2015-01-11 03:45:49 +09:00
parent e293cd4d08
commit bd7331ecf5

View File

@ -255,12 +255,11 @@ func (p *Pattern) extendedMatch(chunk *Chunk) []*Item {
for _, item := range *chunk { for _, item := range *chunk {
input := p.prepareInput(item) input := p.prepareInput(item)
offsets := []Offset{} offsets := []Offset{}
Loop:
for _, term := range p.terms { for _, term := range p.terms {
pfun := p.procFun[term.typ] pfun := p.procFun[term.typ]
if sidx, eidx := p.iter(pfun, input, term.text); sidx >= 0 { if sidx, eidx := p.iter(pfun, input, term.text); sidx >= 0 {
if term.inv { if term.inv {
break Loop break
} }
offsets = append(offsets, Offset{int32(sidx), int32(eidx)}) offsets = append(offsets, Offset{int32(sidx), int32(eidx)})
} else if term.inv { } else if term.inv {