/**
  * @param mixed[] $tokens
  * @param int $i
  *
  * @return mixed
  */
 private function doParse(array $tokens, &$i)
 {
     $docComment = NULL;
     $modifiers = array();
     for (;; ++$i) {
         $id = $tokens[$i][0];
         if (T_WHITESPACE === $id || T_COMMENT === $id) {
             // Continue loop.
         } elseif (T_DOC_COMMENT === $id) {
             $docComment = $tokens[$i][1];
             // Continue loop.
         } elseif (T_PROTECTED === $id || T_PRIVATE === $id || T_PUBLIC === $id || T_ABSTRACT === $id || T_FINAL === $id || T_STATIC === $id) {
             $modifiers[$id] = TRUE;
             // Continue loop.
         } elseif (T_FUNCTION === $id) {
             return $this->methodParser->parse($tokens, $i, $modifiers, $docComment);
         } elseif (FALSE && T_USE === $id) {
             return self::parseUseTrait($tokens, $i);
         } elseif (FALSE && T_VARIABLE === $id) {
             return self::parseMemberVariable($tokens, $i, $modifiers, $docComment);
         } elseif (FALSE && T_CONST === $id) {
             return self::parseClassConstant($tokens, $i, $modifiers, $docComment);
         } else {
             return self::ignoreMiraculousMember($tokens, $i);
         }
     }
     throw new \RuntimeException('Unreachable code.');
 }
 /**
  * @param mixed[] $tokens
  * @param int $i
  *
  * @return mixed
  */
 private function doParse(array $tokens, &$i)
 {
     $id = ParserUtil::nextSubstantialIncl($tokens, $i);
     if (T_USE === $id) {
         return ParserUtil::parseUseStatementGroup($tokens, $i);
     } elseif (T_NAMESPACE === $id) {
         return ParserUtil::parseNamespaceDeclaration($tokens, $i);
     } elseif (T_FINAL === $id || T_ABSTRACT === $id) {
         if (T_DOC_COMMENT === $tokens[$i - 2][0]) {
             $docComment = $tokens[$i - 2][1];
         } else {
             $docComment = NULL;
         }
         $modifiers = array($id => TRUE);
         while (TRUE) {
             $id = ParserUtil::nextSubstantialExcl($tokens, $i);
             $modifiers[$id] = TRUE;
             if (T_CLASS === $id || T_INTERFACE === $id || T_TRAIT === $id) {
                 return $this->classLikeParser->parse($tokens, $i, $modifiers, $docComment);
             } elseif (T_FINAL === $id || T_ABSTRACT === $id) {
                 $modifiers[$id] = TRUE;
             } else {
                 // Something other than the above does not belong here.
                 return FALSE;
             }
         }
         throw new \RuntimeException('Unreachable code.');
     } elseif (T_CLASS === $id || T_INTERFACE === $id || T_TRAIT === $id) {
         if (T_DOC_COMMENT === $tokens[$i - 2][0]) {
             $docComment = $tokens[$i - 2][1];
         } else {
             $docComment = NULL;
         }
         return $this->classLikeParser->parse($tokens, $i, array($id => TRUE), $docComment);
     } elseif ('#' === $id) {
         return FALSE;
     } else {
         return self::ignoreStatement($tokens, $i);
     }
 }