original_string: protected function combineSelectorSingle($base, $other)
      {
          $tag = [];
          $out = [];
          $wasTag = true;
  
          foreach ([$base, $other] as $single) {
              foreach ($single as $part) {
                  if (preg_match('/^[\[.:#]/', $part)) {
                      $out[] = $part;
                      $wasTag = false;
                  } elseif (preg_match('/^[^_-]/', $part)) {
                      $tag[] = $part;
                      $wasTag = true;
                  } elseif ($wasTag) {
                      $tag[count($tag) - 1] .= $part;
                  } else {
                      $out[count($out) - 1] .= $part;
                  }
              }
          }
  
          if (count($tag)) {
              array_unshift($out, $tag[0]);
          }
  
          return $out;
      }
code: protected function combineSelectorSingle($base, $other)
      {
          $tag = [];
          $out = [];
          $wasTag = true;
  
          foreach ([$base, $other] as $single) {
              foreach ($single as $part) {
                  if (preg_match('/^[\[.:#]/', $part)) {
                      $out[] = $part;
                      $wasTag = false;
                  } elseif (preg_match('/^[^_-]/', $part)) {
                      $tag[] = $part;
                      $wasTag = true;
                  } elseif ($wasTag) {
                      $tag[count($tag) - 1] .= $part;
                  } else {
                      $out[count($out) - 1] .= $part;
                  }
              }
          }
  
          if (count($tag)) {
              array_unshift($out, $tag[0]);
          }
  
          return $out;
      }
code_tokens: protected function combineSelectorSingle ( $ base , $ other ) { $ tag = [ ] ; $ out = [ ] ; $ wasTag = true ; foreach ( [ $ base , $ other ] as $ single ) { foreach ( $ single as $ part ) { if ( preg_match ( '/^[\[.:#]/' , $ part ) ) { $ out [ ] = $ part ; $ wasTag = false ; } elseif ( preg_match ( '/^[^_-]/' , $ part ) ) { $ tag [ ] = $ part ; $ wasTag = true ; } elseif ( $ wasTag ) { $ tag [ count ( $ tag ) - 1 ] .= $ part ; } else { $ out [ count ( $ out ) - 1 ] .= $ part ; } } } if ( count ( $ tag ) ) { array_unshift ( $ out , $ tag [ 0 ] ) ; } return $ out ; }
docstring: Combine selector single
  
  @param array $base
  @param array $other
  
  @return array
docstring_tokens: Combine selector single