private static TokenType?remainingFloat(Scanner s) { s.readChar(); // Skip the '.' while (s.isDigit() || s.isExponent()) { if (s.isExponent()) { return(readExponent(s)); } s.readChar(); } return(TokenType.Double); }
private static TokenType?unsignedNumber(Scanner s) { if (!s.isDigit()) { return(null); } while (s.isDigit()) { s.readChar(); } if (s.isExponent()) { return(readExponent(s)); } if (s.peek() != '.') { return(TokenType.Integer); } return(remainingFloat(s)); }
private static TokenType? unsignedNumber(Scanner s) { if (!s.isDigit()) return null; while (s.isDigit()) s.readChar(); if (s.isExponent()) return readExponent(s); if (s.peek() != '.') return TokenType.Integer; return remainingFloat(s); }
private static TokenType? remainingFloat(Scanner s) { s.readChar(); // Skip the '.' while (s.isDigit() || s.isExponent()) { if (s.isExponent()) return readExponent(s); s.readChar(); } return TokenType.Double; }