func parseNext(n int, b []byte) (v Value, _ int, err error) {
	n0 := n
	if n, err = consumeExtra(n, b); err != nil {
		return v, n, err
	}
	if n > n0 {
		v.BeforeExtra = b[n0:n:n]
	}
	v.StartOffset = n
	if v.Value, n, err = parseNextTrimmed(n, b); err != nil {
		return v, n, err
	}
	v.EndOffset = n
	if n, err = consumeExtra(n, b); err != nil {
		return v, n, err
	}
	if n > v.EndOffset {
		v.AfterExtra = b[v.EndOffset:n:n]
	}
	return v, n, nil
}
parseNext parses the next value with surrounding whitespace and comments.
package hujson
import (
	"bytes"
	"errors"
	"fmt"
	"io"
	"unicode/utf8"
)
func lineColumn(b []byte, n int) (line, column int) {
	line = 1 + bytes.Count(b[:n], []byte("\n"))
	column = 1 + n - (bytes.LastIndexByte(b[:n], '\n') + len("\n"))
	return line, column
}
func Parse(b []byte) (Value, error) {
	v, n, err := parseNext(0, b)
	if err == nil && n < len(b) {
		err = fmt.Errorf("invalid character %q after top-level value", b[n])
	}
	if err != nil {
		line, column := lineColumn(b, n)
		err = fmt.Errorf("hujson: line %d, column %d: %w", line, column, err)
		return v, err
	}
	return v, nil
}