private function isLookAhead($expected_type, $skip_type = NULL) {
    $token = NULL;
    for ($offset = 1; ; $offset++) {
      $token = $this->iterator->peek($offset);
      if ($token === NULL) {
        return FALSE;
      }
      if (!($token instanceof HiddenNode) && $token->getType() !== $skip_type) {
        return $expected_type === $token->getType();
      }
    }
    return FALSE;
  }
private function isLookAhead($expected_type, $skip_type = NULL) {
    $token = NULL;
    for ($offset = 1; ; $offset++) {
      $token = $this->iterator->peek($offset);
      if ($token === NULL) {
        return FALSE;
      }
      if (!($token instanceof HiddenNode) && $token->getType() !== $skip_type) {
        return $expected_type === $token->getType();
      }
    }
    return FALSE;
  }
private function isLookAhead ( $ expected_type , $ skip_type = NULL ) { $ token = NULL ; for ( $ offset = 1 ; ; $ offset ++ ) { $ token = $ this -> iterator -> peek ( $ offset ) ; if ( $ token === NULL ) { return FALSE ; } if ( ! ( $ token instanceof HiddenNode ) && $ token -> getType ( ) !== $ skip_type ) { return $ expected_type === $ token -> getType ( ) ; } } return FALSE ; }
Look ahead from current position at tokens and check if the token at
offset is of an expected type, where the offset ignores hidden tokens.
@param int|string $expected_type Expected token type
@param int|string $skip_type (Optional) Additional token type to ignore
@return bool
Look ahead from current position at tokens and check if the token at offset is of an expected type where the offset ignores hidden tokens .