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

Function emitIfStatement

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

Source from the content-addressed store, hash-verified

112519 }
112520 }
112521 function emitIfStatement(node) {
112522 var openParenPos = emitTokenWithComment(99 /* SyntaxKind.IfKeyword */, node.pos, writeKeyword, node);
112523 writeSpace();
112524 emitTokenWithComment(20 /* SyntaxKind.OpenParenToken */, openParenPos, writePunctuation, node);
112525 emitExpression(node.expression);
112526 emitTokenWithComment(21 /* SyntaxKind.CloseParenToken */, node.expression.end, writePunctuation, node);
112527 emitEmbeddedStatement(node, node.thenStatement);
112528 if (node.elseStatement) {
112529 writeLineOrSpace(node, node.thenStatement, node.elseStatement);
112530 emitTokenWithComment(91 /* SyntaxKind.ElseKeyword */, node.thenStatement.end, writeKeyword, node);
112531 if (node.elseStatement.kind === 239 /* SyntaxKind.IfStatement */) {
112532 writeSpace();
112533 emit(node.elseStatement);
112534 }
112535 else {
112536 emitEmbeddedStatement(node, node.elseStatement);
112537 }
112538 }
112539 }
112540 function emitWhileClause(node, startPos) {
112541 var openParenPos = emitTokenWithComment(115 /* SyntaxKind.WhileKeyword */, startPos, writeKeyword, node);
112542 writeSpace();

Callers 1

Calls 6

emitTokenWithCommentFunction · 0.85
writeSpaceFunction · 0.85
emitExpressionFunction · 0.85
emitEmbeddedStatementFunction · 0.85
writeLineOrSpaceFunction · 0.85
emitFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…