func (l *tomlLexer) read() rune {
	r := l.peek()
	if r == '\n' {
		l.endbufferLine++
		l.endbufferCol = 1
	} else {
		l.endbufferCol++
	}
	l.inputIdx++
	return r
}
Basic read operations on input
package toml
import (
	"bytes"
	"errors"
	"fmt"
	"regexp"
	"strconv"
	"strings"
)
var dateRegexp *regexp.Regexp
type tomlLexStateFn func() tomlLexStateFn
type tomlLexer struct {
	inputIdx          int
	input             []rune  
	currentTokenStart int
	currentTokenStop  int
	tokens            []token
	depth             int
	line              int
	col               int
	endbufferLine     int
	endbufferCol      int
}