public/swaggerui/swagger-ui.js
function parseFunctionSourceElements() {
        var statement, body = [], token, directive, firstRestricted,
            oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesisCount,
            node = new Node();

        expect('{');

        while (startIndex < length) {
            if (lookahead.type !== Token.StringLiteral) {
                break;
            }
            token = lookahead;

            statement = parseStatementListItem();
            body.push(statement);
            if (statement.expression.type !== Syntax.Literal) {
                // this is not directive
                break;
            }
            directive = source.slice(token.start + 1, token.end - 1);
            if (directive === 'use strict') {
                strict = true;
                if (firstRestricted) {
                    tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral);
                }
            } else {
                if (!firstRestricted && token.octal) {
                    firstRestricted = token;
                }
            }
        }

        oldLabelSet = state.labelSet;
        oldInIteration = state.inIteration;
        oldInSwitch = state.inSwitch;
        oldInFunctionBody = state.inFunctionBody;
        oldParenthesisCount = state.parenthesizedCount;

        state.labelSet = {};
        state.inIteration = false;
        state.inSwitch = false;
        state.inFunctionBody = true;
        state.parenthesizedCount = 0;

        while (startIndex < length) {
            if (match('}')) {
                break;
            }
            body.push(parseStatementListItem());
        }

        expect('}');

        state.labelSet = oldLabelSet;
        state.inIteration = oldInIteration;
        state.inSwitch = oldInSwitch;
        state.inFunctionBody = oldInFunctionBody;
        state.parenthesizedCount = oldParenthesisCount;

        return node.finishBlockStatement(body);
    }
function parseFunctionSourceElements() {
        var statement, body = [], token, directive, firstRestricted,
            oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesisCount,
            node = new Node();

        expect('{');

        while (startIndex < length) {
            if (lookahead.type !== Token.StringLiteral) {
                break;
            }
            token = lookahead;

            statement = parseStatementListItem();
            body.push(statement);
            if (statement.expression.type !== Syntax.Literal) {
                // this is not directive
                break;
            }
            directive = source.slice(token.start + 1, token.end - 1);
            if (directive === 'use strict') {
                strict = true;
                if (firstRestricted) {
                    tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral);
                }
            } else {
                if (!firstRestricted && token.octal) {
                    firstRestricted = token;
                }
            }
        }

        oldLabelSet = state.labelSet;
        oldInIteration = state.inIteration;
        oldInSwitch = state.inSwitch;
        oldInFunctionBody = state.inFunctionBody;
        oldParenthesisCount = state.parenthesizedCount;

        state.labelSet = {};
        state.inIteration = false;
        state.inSwitch = false;
        state.inFunctionBody = true;
        state.parenthesizedCount = 0;

        while (startIndex < length) {
            if (match('}')) {
                break;
            }
            body.push(parseStatementListItem());
        }

        expect('}');

        state.labelSet = oldLabelSet;
        state.inIteration = oldInIteration;
        state.inSwitch = oldInSwitch;
        state.inFunctionBody = oldInFunctionBody;
        state.parenthesizedCount = oldParenthesisCount;

        return node.finishBlockStatement(body);
    }
function parseFunctionSourceElements ( ) { var statement , body = [ ] , token , directive , firstRestricted , oldLabelSet , oldInIteration , oldInSwitch , oldInFunctionBody , oldParenthesisCount , node = new Node ( ) ; expect ( '{' ) ; while ( startIndex < length ) { if ( lookahead . type !== Token . StringLiteral ) { break ; } token = lookahead ; statement = parseStatementListItem ( ) ; body . push ( statement ) ; if ( statement . expression . type !== Syntax . Literal ) { // this is not directive break ; } directive = source . slice ( token . start + 1 , token . end - 1 ) ; if ( directive === 'use strict' ) { strict = true ; if ( firstRestricted ) { tolerateUnexpectedToken ( firstRestricted , Messages . StrictOctalLiteral ) ; } } else { if ( ! firstRestricted && token . octal ) { firstRestricted = token ; } } } oldLabelSet = state . labelSet ; oldInIteration = state . inIteration ; oldInSwitch = state . inSwitch ; oldInFunctionBody = state . inFunctionBody ; oldParenthesisCount = state . parenthesizedCount ; state . labelSet = { } ; state . inIteration = false ; state . inSwitch = false ; state . inFunctionBody = true ; state . parenthesizedCount = 0 ; while ( startIndex < length ) { if ( match ( '}' ) ) { break ; } body . push ( parseStatementListItem ( ) ) ; } expect ( '}' ) ; state . labelSet = oldLabelSet ; state . inIteration = oldInIteration ; state . inSwitch = oldInSwitch ; state . inFunctionBody = oldInFunctionBody ; state . parenthesizedCount = oldParenthesisCount ; return node . finishBlockStatement ( body ) ; }
ECMA-262 14.1 Function Definition
ECMA - 262 14 . 1 Function Definition