private Token.Number consumeNumber() {
        StringBuilder sb = new StringBuilder();

        int p = this.pos;
        int c = peek();
        if (c == '+' || c == '-') {
            sb.appendCodePoint(next());
        }

        while (isDigit(peek())) {
            sb.appendCodePoint(next());
        }

        mark();
        boolean integer = true;
        int c1 = next();
        int c2 = next();
        if (c1 == '.' && isDigit(c2)) {
            sb.appendCodePoint(c1).appendCodePoint(c2);
            while (isDigit(peek())) {
                sb.appendCodePoint(next());
            }

            integer = false;
        } else {
            setPositionToMark();
        }

        if (isValidExponent()) {
            integer = false;
            sb.appendCodePoint(next()).appendCodePoint(next());
            while (isDigit(peek())) {
                sb.appendCodePoint(next());
            }
        }

        return Token.Number.number(p, sb.toString(), integer);
    }