bin/r.js
function parseGroupExpression() {
        var expr, expressions, startToken, isValidArrowParameter = true;

        expect('(');

        if (match(')')) {
            lex();
            if (!match('=>')) {
                expect('=>');
            }
            return {
                type: PlaceHolders.ArrowParameterPlaceHolder,
                params: []
            };
        }

        startToken = lookahead;
        if (match('...')) {
            expr = parseRestElement();
            expect(')');
            if (!match('=>')) {
                expect('=>');
            }
            return {
                type: PlaceHolders.ArrowParameterPlaceHolder,
                params: [expr]
            };
        }

        if (match('(')) {
            isValidArrowParameter = false;
        }

        expr = parseAssignmentExpression();

        if (match(',')) {
            expressions = [expr];

            while (startIndex < length) {
                if (!match(',')) {
                    break;
                }
                lex();

                if (match('...')) {
                    if (!isValidArrowParameter) {
                        throwUnexpectedToken(lookahead);
                    }
                    expressions.push(parseRestElement());
                    expect(')');
                    if (!match('=>')) {
                        expect('=>');
                    }
                    return {
                        type: PlaceHolders.ArrowParameterPlaceHolder,
                        params: expressions
                    };
                } else if (match('(')) {
                    isValidArrowParameter = false;
                }

                expressions.push(parseAssignmentExpression());
            }

            expr = new WrappingNode(startToken).finishSequenceExpression(expressions);
        }


        expect(')');

        if (match('=>') && !isValidArrowParameter) {
            throwUnexpectedToken(lookahead);
        }

        return expr;
    }
function parseGroupExpression() {
        var expr, expressions, startToken, isValidArrowParameter = true;

        expect('(');

        if (match(')')) {
            lex();
            if (!match('=>')) {
                expect('=>');
            }
            return {
                type: PlaceHolders.ArrowParameterPlaceHolder,
                params: []
            };
        }

        startToken = lookahead;
        if (match('...')) {
            expr = parseRestElement();
            expect(')');
            if (!match('=>')) {
                expect('=>');
            }
            return {
                type: PlaceHolders.ArrowParameterPlaceHolder,
                params: [expr]
            };
        }

        if (match('(')) {
            isValidArrowParameter = false;
        }

        expr = parseAssignmentExpression();

        if (match(',')) {
            expressions = [expr];

            while (startIndex < length) {
                if (!match(',')) {
                    break;
                }
                lex();

                if (match('...')) {
                    if (!isValidArrowParameter) {
                        throwUnexpectedToken(lookahead);
                    }
                    expressions.push(parseRestElement());
                    expect(')');
                    if (!match('=>')) {
                        expect('=>');
                    }
                    return {
                        type: PlaceHolders.ArrowParameterPlaceHolder,
                        params: expressions
                    };
                } else if (match('(')) {
                    isValidArrowParameter = false;
                }

                expressions.push(parseAssignmentExpression());
            }

            expr = new WrappingNode(startToken).finishSequenceExpression(expressions);
        }


        expect(')');

        if (match('=>') && !isValidArrowParameter) {
            throwUnexpectedToken(lookahead);
        }

        return expr;
    }
function parseGroupExpression ( ) { var expr , expressions , startToken , isValidArrowParameter = true ; expect ( '(' ) ; if ( match ( ')' ) ) { lex ( ) ; if ( ! match ( '=>' ) ) { expect ( '=>' ) ; } return { type : PlaceHolders . ArrowParameterPlaceHolder , params : [ ] } ; } startToken = lookahead ; if ( match ( '...' ) ) { expr = parseRestElement ( ) ; expect ( ')' ) ; if ( ! match ( '=>' ) ) { expect ( '=>' ) ; } return { type : PlaceHolders . ArrowParameterPlaceHolder , params : [ expr ] } ; } if ( match ( '(' ) ) { isValidArrowParameter = false ; } expr = parseAssignmentExpression ( ) ; if ( match ( ',' ) ) { expressions = [ expr ] ; while ( startIndex < length ) { if ( ! match ( ',' ) ) { break ; } lex ( ) ; if ( match ( '...' ) ) { if ( ! isValidArrowParameter ) { throwUnexpectedToken ( lookahead ) ; } expressions . push ( parseRestElement ( ) ) ; expect ( ')' ) ; if ( ! match ( '=>' ) ) { expect ( '=>' ) ; } return { type : PlaceHolders . ArrowParameterPlaceHolder , params : expressions } ; } else if ( match ( '(' ) ) { isValidArrowParameter = false ; } expressions . push ( parseAssignmentExpression ( ) ) ; } expr = new WrappingNode ( startToken ) . finishSequenceExpression ( expressions ) ; } expect ( ')' ) ; if ( match ( '=>' ) && ! isValidArrowParameter ) { throwUnexpectedToken ( lookahead ) ; } return expr ; }
11.1.6 The Grouping Operator
11 . 1 . 6 The Grouping Operator