src/Parser.php
private function getNextArgumentValue()
    {
        $validArgumentTypes = [
            Lexer::T_STRING,
            Lexer::T_NUMBER,
            Lexer::T_BOOLEAN,
            Lexer::T_NULL
        ];

        if ($this->lexer->isNextToken(Lexer::T_CLOSE_PARENTHESIS)) {
            return ;
        }

        if ($this->lexer->isNextToken(Lexer::T_OPEN_CURLY_BRACE)) {
            return $this->getArrayArgument();
        }

        if ($this->lexer->isNextToken(Lexer::T_EXPANDER_NAME)) {
            return $this->getNextExpanderNode();
        }

        if (!$this->lexer->isNextTokenAny($validArgumentTypes)) {
            $this->unexpectedSyntaxError($this->lexer->lookahead, 'string, number, boolean or null argument');
        }

        $tokenType = $this->lexer->lookahead['type'];
        $argument = $this->lexer->lookahead['value'];
        $this->lexer->moveNext();

        if ($tokenType === Lexer::T_NULL) {
            $argument = self::NULL_VALUE;
        }

        return $argument;
    }
private function getNextArgumentValue()
    {
        $validArgumentTypes = [
            Lexer::T_STRING,
            Lexer::T_NUMBER,
            Lexer::T_BOOLEAN,
            Lexer::T_NULL
        ];

        if ($this->lexer->isNextToken(Lexer::T_CLOSE_PARENTHESIS)) {
            return ;
        }

        if ($this->lexer->isNextToken(Lexer::T_OPEN_CURLY_BRACE)) {
            return $this->getArrayArgument();
        }

        if ($this->lexer->isNextToken(Lexer::T_EXPANDER_NAME)) {
            return $this->getNextExpanderNode();
        }

        if (!$this->lexer->isNextTokenAny($validArgumentTypes)) {
            $this->unexpectedSyntaxError($this->lexer->lookahead, 'string, number, boolean or null argument');
        }

        $tokenType = $this->lexer->lookahead['type'];
        $argument = $this->lexer->lookahead['value'];
        $this->lexer->moveNext();

        if ($tokenType === Lexer::T_NULL) {
            $argument = self::NULL_VALUE;
        }

        return $argument;
    }
private function getNextArgumentValue ( ) { $ validArgumentTypes = [ Lexer :: T_STRING , Lexer :: T_NUMBER , Lexer :: T_BOOLEAN , Lexer :: T_NULL ] ; if ( $ this -> lexer -> isNextToken ( Lexer :: T_CLOSE_PARENTHESIS ) ) { return ; } if ( $ this -> lexer -> isNextToken ( Lexer :: T_OPEN_CURLY_BRACE ) ) { return $ this -> getArrayArgument ( ) ; } if ( $ this -> lexer -> isNextToken ( Lexer :: T_EXPANDER_NAME ) ) { return $ this -> getNextExpanderNode ( ) ; } if ( ! $ this -> lexer -> isNextTokenAny ( $ validArgumentTypes ) ) { $ this -> unexpectedSyntaxError ( $ this -> lexer -> lookahead , 'string, number, boolean or null argument' ) ; } $ tokenType = $ this -> lexer -> lookahead [ 'type' ] ; $ argument = $ this -> lexer -> lookahead [ 'value' ] ; $ this -> lexer -> moveNext ( ) ; if ( $ tokenType === Lexer :: T_NULL ) { $ argument = self :: NULL_VALUE ; } return $ argument ; }
Try to get next argument. Return false if there are no arguments left before ")"

@return null|mixed
Try to get next argument . Return false if there are no arguments left before )