function number() {
	var string;
	var value;

	string = '';
	if ( ch === '~' ) {
		string += '~';
		goNext( '~' );
	}
	if ( ch === '-' ) {
		string += '-';
		goNext( '-' );
	}
	if ( ch === '+' ) {
		goNext( '+' );
	}
	if ( ch === 'I' ) {
		goNext( 'I' );
		goNext( 'n' );
		goNext( 'f' );
		goNext( 'i' );
		goNext( 'n' );
		goNext( 'i' );
		goNext( 't' );
		goNext( 'y' );
		return ( string === '-' ) ? NINF : PINF;
	}
	while ( ch >= '0' && ch <= '9' ) {
		string += ch;
		goNext();
	}
	if ( ch === '.' ) {
		string += '.';
		while ( goNext() && ch >= '0' && ch <= '9' ) {
			string += ch;
		}
	}
	if ( ch === 'e' || ch === 'E' ) {
		string += ch;
		goNext();
		if ( ch === '-' || ch === '+' ) {
			string += ch;
			goNext();
		}
		while ( ch >= '0' && ch <= '9' ) {
			string += ch;
			goNext();
		}
	}
	if ( startsWith( string, '~' ) ) {
		return string;
	}
	value = +string;
	if ( !isFinite( value ) ) {
		return error( 'Bad number' );
	}
	return value;
}
Parses a number value.

@private
@returns {(number|string)} parsed number or string for rounded values