lib/number.js
function consumeForward(stream) {
	const start = stream.pos;
	if (stream.eat(DOT) && stream.eatWhile(isNumber)) {
		// short decimal notation: .025
		return true;
	}

	if (stream.eatWhile(isNumber) && (!stream.eat(DOT) || stream.eatWhile(isNumber))) {
		// either integer or decimal: 10, 10.25
		return true;
	}

	stream.pos = start;
	return false;
}
function consumeForward(stream) {
	const start = stream.pos;
	if (stream.eat(DOT) && stream.eatWhile(isNumber)) {
		// short decimal notation: .025
		return true;
	}

	if (stream.eatWhile(isNumber) && (!stream.eat(DOT) || stream.eatWhile(isNumber))) {
		// either integer or decimal: 10, 10.25
		return true;
	}

	stream.pos = start;
	return false;
}
function consumeForward ( stream ) { const start = stream . pos ; if ( stream . eat ( DOT ) && stream . eatWhile ( isNumber ) ) { // short decimal notation: .025 return true ; } if ( stream . eatWhile ( isNumber ) && ( ! stream . eat ( DOT ) || stream . eatWhile ( isNumber ) ) ) { // either integer or decimal: 10, 10.25 return true ; } stream . pos = start ; return false ; }
Consumes number in forward stream direction
@param  {StreamReader} stream
@return {Boolean}        Returns true if number was consumed
Consumes number in forward stream direction