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

Function printNode

test/fixtures/snapshot/typescript.js:110771–110790  ·  view source on GitHub ↗
(hint, node, sourceFile)

Source from the content-addressed store, hash-verified

110769 bundleFileInfo: bundleFileInfo
110770 };
110771 function printNode(hint, node, sourceFile) {
110772 switch (hint) {
110773 case 0 /* EmitHint.SourceFile */:
110774 ts.Debug.assert(ts.isSourceFile(node), "Expected a SourceFile node.");
110775 break;
110776 case 2 /* EmitHint.IdentifierName */:
110777 ts.Debug.assert(ts.isIdentifier(node), "Expected an Identifier node.");
110778 break;
110779 case 1 /* EmitHint.Expression */:
110780 ts.Debug.assert(ts.isExpression(node), "Expected an Expression node.");
110781 break;
110782 }
110783 switch (node.kind) {
110784 case 305 /* SyntaxKind.SourceFile */: return printFile(node);
110785 case 306 /* SyntaxKind.Bundle */: return printBundle(node);
110786 case 307 /* SyntaxKind.UnparsedSource */: return printUnparsedSource(node);
110787 }
110788 writeNode(hint, node, sourceFile, beginPrint());
110789 return endPrint();
110790 }
110791 function printList(format, nodes, sourceFile) {
110792 writeList(format, nodes, sourceFile, beginPrint());
110793 return endPrint();

Callers

nothing calls this directly

Calls 7

printFileFunction · 0.85
printBundleFunction · 0.85
printUnparsedSourceFunction · 0.85
writeNodeFunction · 0.85
beginPrintFunction · 0.85
endPrintFunction · 0.85
assertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…