private Token readInteger(Token token) throws ScriptException {
        while (line != null) {
            char ch = charAt(index);
            index++;
            if (Character.isDigit(ch))
                token.append(ch);
            else if (ch == '.' && Character.isDigit(charAt(index)))
                return readNumber(token.append(ch));
            else {
                index--;
                return token.setType(Tokens.NUMBER);
            }
        }
        return null;
    }