src/ContainerParser/Parser/ArgumentArrayParser.php
protected function next()
    { 
        $token = $this->currentToken();

        // the argument might be an array
        if ($this->currentToken()->isType(T::TOKEN_SCOPE_OPEN)) 
        {
            $this->arguments->addArgument($this->parseChild(
                ArrayParser::class, 
                $this->getTokensUntilClosingScope(
                    false, 
                    T::TOKEN_SCOPE_OPEN, 
                    T::TOKEN_SCOPE_CLOSE
                ), 
                false
            ));
        }
        // or a simple scalar value
        elseif ($token->isValue())
        {
            $this->arguments->addArgument(ValueNode::fromToken($token));
        }
        // is it a parameter?
        elseif ($token->isType(T::TOKEN_PARAMETER)) 
        {
            $this->arguments->addArgument($this->parseChild(ReferenceParser::class));
        }
        // is a service reference
        elseif ($token->isType(T::TOKEN_DEPENDENCY)) 
        {
            $this->arguments->addArgument($this->parseChild(ReferenceParser::class));
        }
        // just a linebreak
        elseif ($token->isType(T::TOKEN_LINE)) 
        {
            $this->skipToken(); return;
        }

        // anything else?
        else 
        {
            throw $this->errorUnexpectedToken($token);
        }

        $this->skipToken();

        // now ther might follow a seperator indicating another argument
        if (!$this->parserIsDone() && $this->currentToken()->isType(T::TOKEN_SEPERATOR)) 
        {
            $this->skipToken();
        }
    }
protected function next()
    { 
        $token = $this->currentToken();

        // the argument might be an array
        if ($this->currentToken()->isType(T::TOKEN_SCOPE_OPEN)) 
        {
            $this->arguments->addArgument($this->parseChild(
                ArrayParser::class, 
                $this->getTokensUntilClosingScope(
                    false, 
                    T::TOKEN_SCOPE_OPEN, 
                    T::TOKEN_SCOPE_CLOSE
                ), 
                false
            ));
        }
        // or a simple scalar value
        elseif ($token->isValue())
        {
            $this->arguments->addArgument(ValueNode::fromToken($token));
        }
        // is it a parameter?
        elseif ($token->isType(T::TOKEN_PARAMETER)) 
        {
            $this->arguments->addArgument($this->parseChild(ReferenceParser::class));
        }
        // is a service reference
        elseif ($token->isType(T::TOKEN_DEPENDENCY)) 
        {
            $this->arguments->addArgument($this->parseChild(ReferenceParser::class));
        }
        // just a linebreak
        elseif ($token->isType(T::TOKEN_LINE)) 
        {
            $this->skipToken(); return;
        }

        // anything else?
        else 
        {
            throw $this->errorUnexpectedToken($token);
        }

        $this->skipToken();

        // now ther might follow a seperator indicating another argument
        if (!$this->parserIsDone() && $this->currentToken()->isType(T::TOKEN_SEPERATOR)) 
        {
            $this->skipToken();
        }
    }
Parse the next token

@return null|Node