func (l *Lexer) NextToken() token.Token {
	for {
		select {
		case item, ok := <-l.tokens:
			if ok {
				return item
			}
			panic(fmt.Errorf("No items left"))
		default:
			l.state = l.state(l)
			if l.state == nil {
				close(l.tokens)
			}
		}
	}
}
NextToken will return the next token processed from the lexer.

Callers should make sure to call Lexer.HasNext before calling this method
as it will panic if it is called after token.EOF is returned.
package lexer
import (
	"bytes"
	"fmt"
	"strings"
	"unicode"
	"unicode/utf8"
	"github.com/goruby/goruby/token"
)
const (
	eof = -1
)
var LexStartFn = startLexer
type StateFn func(*Lexer) StateFn
const operatorCharacters = "+-!*/%&<>=,;#.:(){}[]|@?$"
func New(input string) *Lexer {
	l := &Lexer{
		input:  input,
		state:  startLexer,
		tokens: make(chan token.Token, 2),  
	}
	return l
}
type Lexer struct {
	input     string            
	state     StateFn           
	pos       int               
	start     int               
	width     int               
	tokens    chan token.Token  
	lastToken token.Token       
}