protected function skipDigits(int $code): void
    {
        if (isNumber($code)) {
            do {
                $code = $this->readCharCode(++$this->position);
            } while (isNumber($code));

            return;
        }

        throw $this->createSyntaxErrorException(
            \sprintf('Invalid number, expected digit but got: %s.', printCharCode($code))
        );
    }