/** * Parses a variable or any other valid member expression that is prefixed * with PHP's reference operator. * * <code> * // ----------- * foreach ( $array as &$this->foo ) {} * // ----------- * * // ---------- * $foo = &$bar->baz; * // ---------- * </code> * * @return PHP_Depend_Code_ASTUnaryExpression * @since 0.9.18 */ private function parseVariableOrMemberByReference() { $this->tokenStack->push(); $token = $this->consumeToken(self::T_BITWISE_AND); $this->consumeComments(); $expr = $this->builder->buildAstUnaryExpression($token->image); $expr->addChild($this->parseVariableOrConstantOrPrimaryPrefix()); return $this->setNodePositionsAndReturn($expr); }