private function parseFunctionArgument($funcName, $context)
    {
        try
        {
            return $this->parsePrimitiveValue();
        }
        catch(\Exception $e)
        {
            $name = $this->tokenizer->getTokenValue();

            if($name)
            {
                // ADVANCE
                $this->tokenizer->readNextToken();

                // NESTED FUNCTION
                if($this->tokenizer->is(TokenType::LEFT_PAREN))
                {
                    return $this->parseFunctionExpression($name, $context);
                }

                // ARBITRARY IDENTIFIER, e.g. SOQL NAME
                return new AST\SoqlName($name);
            }
            throw $e;
        }
    }
private function parseFunctionArgument($funcName, $context)
    {
        try
        {
            return $this->parsePrimitiveValue();
        }
        catch(\Exception $e)
        {
            $name = $this->tokenizer->getTokenValue();

            if($name)
            {
                // ADVANCE
                $this->tokenizer->readNextToken();

                // NESTED FUNCTION
                if($this->tokenizer->is(TokenType::LEFT_PAREN))
                {
                    return $this->parseFunctionExpression($name, $context);
                }

                // ARBITRARY IDENTIFIER, e.g. SOQL NAME
                return new AST\SoqlName($name);
            }
            throw $e;
        }
    }
private function parseFunctionArgument ( $ funcName , $ context ) { try { return $ this -> parsePrimitiveValue ( ) ; } catch ( \ Exception $ e ) { $ name = $ this -> tokenizer -> getTokenValue ( ) ; if ( $ name ) { // ADVANCE $ this -> tokenizer -> readNextToken ( ) ; // NESTED FUNCTION if ( $ this -> tokenizer -> is ( TokenType :: LEFT_PAREN ) ) { return $ this -> parseFunctionExpression ( $ name , $ context ) ; } // ARBITRARY IDENTIFIER, e.g. SOQL NAME return new AST \ SoqlName ( $ name ) ; } throw $ e ; } }
Parses a single function argument. Can be expression or
function by itself.

@param string $funcName
@param int $context
@throws \Exception
@return Functions\SoqlFunctionInterface|AST\SoqlName
Parses a single function argument . Can be expression or function by itself .