MCPcopy
hub / github.com/webpack/webpack / walkUnaryExpression

Method walkUnaryExpression

lib/javascript/JavascriptParser.js:3794–3812  ·  view source on GitHub ↗

* Walk unary expression. * @param {UnaryExpression} expression the unary expression

(expression)

Source from the content-addressed store, hash-verified

3792 * @param {UnaryExpression} expression the unary expression
3793 */
3794 walkUnaryExpression(expression) {
3795 if (expression.operator === "typeof") {
3796 const result = this.callHooksForExpression(
3797 this.hooks.typeof,
3798 expression.argument,
3799 expression
3800 );
3801 if (result === true) return;
3802 if (expression.argument.type === "ChainExpression") {
3803 const result = this.callHooksForExpression(
3804 this.hooks.typeof,
3805 expression.argument.expression,
3806 expression
3807 );
3808 if (result === true) return;
3809 }
3810 }
3811 this.walkExpression(expression.argument);
3812 }
3813
3814 /**
3815 * Walk left right expression.

Callers 1

walkExpressionMethod · 0.95

Calls 2

walkExpressionMethod · 0.95

Tested by

no test coverage detected