private function handleDeviceBlock(Lexer $lexer, int $useragentPosition, int $childPosition) : int
    {
        $capturedKey = false;
        $sawColon    = false;

        $branchStart     = $this->getLocationCoordinates($lexer);
        $branchLocations = [];
        $branchCoverage  = [];

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

            if (self::JSON_STRING === $code && false === $capturedKey) {
                $branchLocations[] = [
                    'start' => $this->getLocationCoordinates($lexer, false, '"' . $lexer->yytext . '"'),
                    'end' => $this->getLocationCoordinates($lexer, true, '"' . $lexer->yytext . '"'),
                ];
                $branchCoverage[] = $this->getCoverageCount(
                    sprintf('u%d::c%d::d%s::p', $useragentPosition, $childPosition, $lexer->yytext),
                    $this->fileCoveredIds
                );
                $capturedKey = true;
            } elseif (self::JSON_COLON === $code) {
                $sawColon = true;
            } elseif (self::JSON_STRING === $code && true === $sawColon) {
                $capturedKey = false;
            }
        } while (self::JSON_OBJECT_END !== $code);

        $branchEnd = $this->getLocationCoordinates($lexer, true);

        $this->collectBranch($branchStart, $branchEnd, $branchLocations, $branchCoverage);

        return $lexer->lex();
    }