diff options
| author | Felix Hanley <felix@userspace.com.au> | 2020-03-10 04:19:52 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2020-03-10 04:19:52 +0000 |
| commit | 78cfd8633bdf1f77b40a10929556d30042cb5dff (patch) | |
| tree | 1f0fca376281352d255ef2bb5f9973d91c3c8215 /lexer.go | |
| parent | 794369aa072d877cae9db28de74bdf94b00ca9e4 (diff) | |
| download | lexer-78cfd8633bdf1f77b40a10929556d30042cb5dff.tar.gz lexer-78cfd8633bdf1f77b40a10929556d30042cb5dff.tar.bz2 | |
Add Tokens() returning the internal channelv0.1.1
Diffstat (limited to 'lexer.go')
| -rw-r--r-- | lexer.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -203,6 +203,11 @@ func (l *Lexer) SkipWhitespace() { } } +// Tokens returns the a token channel. +func (l *Lexer) Tokens() <-chan Token { + return l.tokens +} + // NextToken returns the next token from the lexer and done func (l *Lexer) NextToken() (*Token, bool) { if tok, ok := <-l.tokens; ok { |
