private function handleUseragentBlock(Lexer $lexer, int $useragentPosition) : int
    {
        $enterChildGroup = false;

        do {
            $code = $lexer->lex();

            if (self::JSON_STRING === $code && 'children' === $lexer->yytext) {
                $enterChildGroup = true;
            } elseif (self::JSON_ARRAY_START === $code && true === $enterChildGroup) {
                $code            = $this->handleChildrenGroup($lexer, $useragentPosition);
                $enterChildGroup = false;
            } elseif (self::JSON_OBJECT_START === $code) {
                $code = $this->ignoreObjectBlock($lexer);
            }
        } while (self::JSON_OBJECT_END !== $code);

        return $lexer->lex();
    }