From: sgf Date: Fri, 24 Jun 2022 12:39:03 +0000 (+0300) Subject: go(lex): Try to run parser. X-Git-Url: https://gitweb.sgf-dma.tk/?a=commitdiff_plain;h=22900c5ff2205757241bf5c5bddb5aa4b4d5c97f;p=go.git go(lex): Try to run parser. --- diff --git a/lexical-scanning-in-go/lex.go b/lexical-scanning-in-go/lex.go index 8e047d6..0dc0bb9 100644 --- a/lexical-scanning-in-go/lex.go +++ b/lexical-scanning-in-go/lex.go @@ -204,6 +204,10 @@ func (l *lexer) errorf(format string, args ...interface{}) stateFn { } func main() { - fmt.Println("Huita") + _, ch := lex("huy", "text {{ 1.34e3 }} yet another text") + for it := range ch { + fmt.Printf("Received %v\n", it) + } + fmt.Println("End") }