public/swaggerui/swagger-ui.js
function parseUnaryExpression() {
        var token, expr, startToken;

        if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
            expr = parsePostfixExpression();
        } else if (match('++') || match('--')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            // ECMA-262 11.4.4, 11.4.5
            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
                tolerateError(Messages.StrictLHSPrefix);
            }

            if (!isAssignmentTarget) {
                tolerateError(Messages.InvalidLHSInAssignment);
            }
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            isAssignmentTarget = isBindingElement = false;
        } else if (match('+') || match('-') || match('~') || match('!')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            isAssignmentTarget = isBindingElement = false;
        } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
                tolerateError(Messages.StrictDelete);
            }
            isAssignmentTarget = isBindingElement = false;
        } else {
            expr = parsePostfixExpression();
        }

        return expr;
    }
function parseUnaryExpression() {
        var token, expr, startToken;

        if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
            expr = parsePostfixExpression();
        } else if (match('++') || match('--')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            // ECMA-262 11.4.4, 11.4.5
            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
                tolerateError(Messages.StrictLHSPrefix);
            }

            if (!isAssignmentTarget) {
                tolerateError(Messages.InvalidLHSInAssignment);
            }
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            isAssignmentTarget = isBindingElement = false;
        } else if (match('+') || match('-') || match('~') || match('!')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            isAssignmentTarget = isBindingElement = false;
        } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
            startToken = lookahead;
            token = lex();
            expr = inheritCoverGrammar(parseUnaryExpression);
            expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
            if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
                tolerateError(Messages.StrictDelete);
            }
            isAssignmentTarget = isBindingElement = false;
        } else {
            expr = parsePostfixExpression();
        }

        return expr;
    }
function parseUnaryExpression ( ) { var token , expr , startToken ; if ( lookahead . type !== Token . Punctuator && lookahead . type !== Token . Keyword ) { expr = parsePostfixExpression ( ) ; } else if ( match ( '++' ) || match ( '--' ) ) { startToken = lookahead ; token = lex ( ) ; expr = inheritCoverGrammar ( parseUnaryExpression ) ; // ECMA-262 11.4.4, 11.4.5 if ( strict && expr . type === Syntax . Identifier && isRestrictedWord ( expr . name ) ) { tolerateError ( Messages . StrictLHSPrefix ) ; } if ( ! isAssignmentTarget ) { tolerateError ( Messages . InvalidLHSInAssignment ) ; } expr = new WrappingNode ( startToken ) . finishUnaryExpression ( token . value , expr ) ; isAssignmentTarget = isBindingElement = false ; } else if ( match ( '+' ) || match ( '-' ) || match ( '~' ) || match ( '!' ) ) { startToken = lookahead ; token = lex ( ) ; expr = inheritCoverGrammar ( parseUnaryExpression ) ; expr = new WrappingNode ( startToken ) . finishUnaryExpression ( token . value , expr ) ; isAssignmentTarget = isBindingElement = false ; } else if ( matchKeyword ( 'delete' ) || matchKeyword ( 'void' ) || matchKeyword ( 'typeof' ) ) { startToken = lookahead ; token = lex ( ) ; expr = inheritCoverGrammar ( parseUnaryExpression ) ; expr = new WrappingNode ( startToken ) . finishUnaryExpression ( token . value , expr ) ; if ( strict && expr . operator === 'delete' && expr . argument . type === Syntax . Identifier ) { tolerateError ( Messages . StrictDelete ) ; } isAssignmentTarget = isBindingElement = false ; } else { expr = parsePostfixExpression ( ) ; } return expr ; }
ECMA-262 12.5 Unary Operators
ECMA - 262 12 . 5 Unary Operators