func (l *Lexer) ignore() {
	l.start = l.pos
}
ignore skips over the pending input before this point.
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       
}
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)
			}
		}
	}
}
func (l *Lexer) HasNext() bool {
	return l.state != nil
}
func (l *Lexer) emit(t token.Type) {
	token := token.NewToken(t, l.input[l.start:l.pos], l.start)
	l.lastToken = token
	l.tokens <- token
	l.start = l.pos
}
func (l *Lexer) next() rune {
	if l.pos >= len(l.input) {
		l.width = 0
		return eof
	}
	var r rune
	r, l.width = utf8.DecodeRuneInString(l.input[l.pos:])
	l.pos += l.width
	return r
}