forked from mirror/glob
bugfix
This commit is contained in:
parent
eccf734cd7
commit
f031a1f239
4
lexer.go
4
lexer.go
|
@ -142,7 +142,7 @@ func newLexer(source string) *lexer {
|
||||||
l := &lexer{
|
l := &lexer{
|
||||||
input: source,
|
input: source,
|
||||||
state: lexText,
|
state: lexText,
|
||||||
items: make(chan item, 5),
|
items: make(chan item, len(source)),
|
||||||
termPhrases: make(map[int]int),
|
termPhrases: make(map[int]int),
|
||||||
}
|
}
|
||||||
return l
|
return l
|
||||||
|
@ -299,9 +299,7 @@ func lexText(l *lexer) stateFn {
|
||||||
l.unread()
|
l.unread()
|
||||||
l.emitMaybe(item_text)
|
l.emitMaybe(item_text)
|
||||||
return lexSeparator
|
return lexSeparator
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if l.pos > l.start {
|
if l.pos > l.start {
|
||||||
|
|
Loading…
Reference in New Issue