schema/lexer.go
func (l *Lexer) Offset() int {

	// find last line break
	lineoffset := strings.LastIndex(l.input[:l.Pos], "\n")
	if lineoffset != -1 {

		// calculate current offset from last line break
		return l.Pos - lineoffset
	}

	// first line
	return l.Pos
}
func (l *Lexer) Offset() int {

	// find last line break
	lineoffset := strings.LastIndex(l.input[:l.Pos], "\n")
	if lineoffset != -1 {

		// calculate current offset from last line break
		return l.Pos - lineoffset
	}

	// first line
	return l.Pos
}
// Offset determines the character offset from the beginning of the current line