finishNumber method
Implementation
Token finishNumber() {
eatDigits();
if (_peekChar() == TokenChar.DOT) {
// Handle the case of 1.toString().
_nextChar();
if (TokenizerHelpers.isDigit(_peekChar())) {
eatDigits();
return finishNumberExtra(TokenKind.DOUBLE);
} else {
_index--;
}
}
return finishNumberExtra(TokenKind.INTEGER);
}