private static Expr[] parseExpressionList(StmtParser parser
                                             , Token currentToken
                                             , EnumSet<LeolaTokenType> commaDelimeter
                                             , LeolaTokenType endToken, boolean isParameter) throws Exception
    {
        ExprParser expressionParser = new ExprParser(parser, isParameter);

        Token token = parser.nextToken();  // consume opening (

        List<Expr> paramsNode = new ArrayList<Expr>();

        boolean isArrayExpanded = false;
        
        // Loop to parse each actual parameter.
        while (token.getType() != endToken) {
            Expr actualNode = expressionParser.parseExpr(token);
            paramsNode.add(actualNode);
                        
            /* Ensure we only have one array expansion in the parameter
             * listings
             */
            if(actualNode instanceof NamedParameterExpr) {
                NamedParameterExpr nExpr = (NamedParameterExpr)actualNode;
                if(nExpr.getValueExpr().hasFlag(ASTAttributes.IS_ARG_ARRAY_EXPAND)) {                       
                    if(isArrayExpanded) {
                        parser.throwParseError(token, LeolaErrorCode.INVALID_MULTI_ARGS_EXPANSION);
                    }
                    
                    isArrayExpanded = true;    
                }
            }
            else if(actualNode.hasFlag(ASTAttributes.IS_ARG_ARRAY_EXPAND)) {
                if(isArrayExpanded) {
                    parser.throwParseError(token, LeolaErrorCode.INVALID_MULTI_ARGS_EXPANSION);
                }
                
                isArrayExpanded = true;
            }

            token = parser.expectedTokens(commaDelimeter);
            LeolaTokenType tokenType = token.getType();

            // Look for the comma.
            if (tokenType == COMMA) {
                token = parser.nextToken();  // consume ,
            }
            else if (ExprParser.EXPR_START_SET.contains(tokenType)) {
                parser.throwParseError(token, LeolaErrorCode.MISSING_COMMA);
            }
            else if (tokenType != endToken) {
                token = parser.expectedTokens(ExprParser.EXPR_START_SET);
            }
        }

        token = parser.nextToken();  // consume closing )

        return paramsNode.toArray(new Expr[paramsNode.size()]);
    }