Pinq\Parsing\IFunctionStructure::getBodyExpressions PHP Method

getBodyExpressions() public method

Gets the body expressions of the function.
public getBodyExpressions ( ) : Expression[]
return Pinq\Expressions\Expression[]
    public function getBodyExpressions();

Usage Example

Beispiel #1
0
 private function recompile(Parsing\IFunctionReflection $reflection, Parsing\IFunctionStructure $structure, &$closureExpression = null)
 {
     $signature = $reflection->getSignature();
     $usedVariables = array_map(function ($name) {
         return O\Expression::closureUsedVariable($name);
     }, $signature->getScopedVariableNames() ?: []);
     $closureExpression = O\Expression::closure($signature->returnsReference(), $reflection->getInnerReflection()->getClosureScopeClass() === null, $signature->getParameterExpressions(), $usedVariables, $structure->getBodyExpressions());
     return $closureExpression->evaluate($reflection->asEvaluationContext());
 }