func (l *lexer) scanNumber() bool {
	digits := "0123456789"
	// Disallow hexadecimal in series descriptions as the syntax is ambiguous.
	if !l.seriesDesc && l.accept("0") && l.accept("xX") {
		digits = "0123456789abcdefABCDEF"
	}
	l.acceptRun(digits)
	if l.accept(".") {
		l.acceptRun(digits)
	}
	if l.accept("eE") {
		l.accept("+-")
		l.acceptRun("0123456789")
	}
	// Next thing must not be alphanumeric unless it's the times token
	// for series repetitions.
	if r := l.peek(); (l.seriesDesc && r == 'x') || !isAlphaNumeric(r) {
		return true
	}
	return false
}
func (l *lexer) scanNumber() bool {
	digits := "0123456789"
	// Disallow hexadecimal in series descriptions as the syntax is ambiguous.
	if !l.seriesDesc && l.accept("0") && l.accept("xX") {
		digits = "0123456789abcdefABCDEF"
	}
	l.acceptRun(digits)
	if l.accept(".") {
		l.acceptRun(digits)
	}
	if l.accept("eE") {
		l.accept("+-")
		l.acceptRun("0123456789")
	}
	// Next thing must not be alphanumeric unless it's the times token
	// for series repetitions.
	if r := l.peek(); (l.seriesDesc && r == 'x') || !isAlphaNumeric(r) {
		return true
	}
	return false
}
func ( l * lexer ) scanNumber ( ) bool { digits := " " // Disallow hexadecimal in series descriptions as the syntax is ambiguous. if ! l . seriesDesc && l . accept ( " " ) && l . accept ( " " ) { digits = " " } l . acceptRun ( digits ) if l . accept ( " " ) { l . acceptRun ( digits ) } if l . accept ( " " ) { l . accept ( " " ) l . acceptRun ( " " ) } // Next thing must not be alphanumeric unless it's the times token // for series repetitions. if r := l . peek ( ) ; ( l . seriesDesc && r == 'x' ) || ! isAlphaNumeric ( r ) { return true } return false }
// scanNumber scans numbers of different formats. The scanned item is
// not necessarily a valid number. This case is caught by the parser.
scanNumber scans numbers of different formats . The scanned item is not necessarily a valid number . This case is caught by the parser .