Green tests

This commit is contained in:
2015-02-18 22:33:57 +07:00
parent d5663a7876
commit 3faf1adbad
4 changed files with 90 additions and 75 deletions
+2 -1
View File
@@ -35,7 +35,7 @@ func New(buf buffer.Bufferer, sels []string) *Parser {
}
}
// Starts parsing
// Parse all and return matches
func (p *Parser) Parse() map[string][]interface{} {
p.ParseStream()
out := map[string][]interface{}{}
@@ -49,6 +49,7 @@ func (p *Parser) Parse() map[string][]interface{} {
return out
}
// Starts parsing
func (p *Parser) ParseStream() <-chan Match {
go p.lex.Run()
go func() {