scanNumber method
Implementation
Token scanNumber(int x) {
if (x == char.$0) {
x = next();
if (x == char.$x || x == char.$X) {
x = next();
return scanHexNumber(x);
}
}
while (isDigit(x)) {
x = next();
}
if (x == char.DOT) {
x = next();
return scanDecimalPart(x);
}
return scanExponentPart(x);
}