package decoder

import (
	
)

// The numbers of the input are parsed by jsonnum, in the buffer which a nul byte ends. The functions here are
// inlined, so that they are direct calls, which jsonnum.ParseDigits is inlined into.

// maxUint64Digits is the number of the digits which a uint64 holds whatever they are.
const maxUint64Digits = jsonnum.MaxUint64Digits

func parseDigits( []byte,  int64) (uint64, int64, int) {
	return jsonnum.ParseDigits(, )
}

func isFloatContinuation( byte) bool {
	return jsonnum.IsFloatContinuation()
}

func parseFloatFast( []byte,  int64) (float64, int64, bool) {
	return jsonnum.ParseFloatTerminated(, )
}

// numberEnd returns the position after the number which starts at start, checked by the grammar of the JSON
// numbers, which is followed by a byte which may end a value.
func numberEnd( []byte,  int64) (int64, error) {
	,  := jsonnum.Scan([:])
	 :=  + int64()
	if  != jsonnum.Valid {
		return 0, numberPlaceError(, , , )
	}
	if !validEndNumberChar[[]] {
		return 0, syntaxErrorAt(, , whereAfterTop)
	}
	return , nil
}

// skipDigits returns the position of the first byte from c which is not a digit.
func skipDigits( []byte,  int64) int64 {
	for []-'0' <= 9 {
		++
	}
	return 
}

// numberPlaceError returns the syntax error of the byte at cursor in the number which starts at start, which
// jsonnum.Scan found invalid at place.
func numberPlaceError( []byte, ,  int64,  jsonnum.Place) error {
	 := whereNumber
	switch  {
	case jsonnum.Fraction:
		 = whereFraction
	case jsonnum.Exponent:
		 = whereExponent
	}
	return numberSyntaxError(, , , )
}