MCPcopy Index your code
hub / github.com/nodejs/node / emitPrefixUnaryExpression

Function emitPrefixUnaryExpression

test/fixtures/snapshot/typescript.js:112305–112311  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

112303 emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
112304 }
112305 function emitPrefixUnaryExpression(node) {
112306 writeTokenText(node.operator, writeOperator);
112307 if (shouldEmitWhitespaceBeforeOperand(node)) {
112308 writeSpace();
112309 }
112310 emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPrefixUnary);
112311 }
112312 function shouldEmitWhitespaceBeforeOperand(node) {
112313 // In some cases, we need to emit a space between the operator and the operand. One obvious case
112314 // is when the operator is an identifier, like delete or typeof. We also need to do this for plus

Callers 1

Calls 4

writeTokenTextFunction · 0.85
writeSpaceFunction · 0.85
emitExpressionFunction · 0.85

Tested by

no test coverage detected