func (l *Lexer) Next() 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)
			}
		}
	}
}
// Next returns the next item from the input.
Next returns the next item from the input.
// Next returns the next item from the input .
func (l *Lexer) Next() 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)
			}
		}
	}
}
func ( l * Lexer ) Next ( ) Token { for { select { case item , ok := <- l . tokens : if ok { return item } panic ( fmt . Errorf ( " " ) ) default : l . state = l . state ( l ) if l . state == nil { close ( l . tokens ) } } } }
Next returns the next item from the input.
Next returns the next item from the input .