aboutsummaryrefslogtreecommitdiff
path: root/lexer.go
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.go')
-rw-r--r--lexer.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/lexer.go b/lexer.go
index 35daff9..85c5220 100644
--- a/lexer.go
+++ b/lexer.go
@@ -64,13 +64,7 @@ func New(src string, start StateFunc) *Lexer {
// Start begins executing the Lexer in an asynchronous manner (using a goroutine).
func (l *Lexer) Start() {
- // Take half the string length as a buffer size.
- buffSize := len(l.source) / 2
- if buffSize <= 0 {
- buffSize = 1
- }
- l.tokens = make(chan Token, buffSize)
- go l.run()
+ go l.StartSync()
}
// StartSync starts the lexer synchronously.