This commit is contained in:
gobwas 2016-02-25 00:31:37 +03:00
parent eccf734cd7
commit f031a1f239
1 changed files with 1 additions and 3 deletions

View File

@ -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 {