MCPcopy Create free account
hub / github.com/nodejs/node / pipelineEmitWithHintWorker

Function pipelineEmitWithHintWorker

test/fixtures/snapshot/typescript.js:111085–111547  ·  view source on GitHub ↗
(hint, node, allowSnippets)

Source from the content-addressed store, hash-verified

111083 currentParenthesizerRule = undefined;
111084 }
111085 function pipelineEmitWithHintWorker(hint, node, allowSnippets) {
111086 if (allowSnippets === void 0) { allowSnippets = true; }
111087 if (allowSnippets) {
111088 var snippet = ts.getSnippetElement(node);
111089 if (snippet) {
111090 return emitSnippetNode(hint, node, snippet);
111091 }
111092 }
111093 if (hint === 0 /* EmitHint.SourceFile */)
111094 return emitSourceFile(ts.cast(node, ts.isSourceFile));
111095 if (hint === 2 /* EmitHint.IdentifierName */)
111096 return emitIdentifier(ts.cast(node, ts.isIdentifier));
111097 if (hint === 6 /* EmitHint.JsxAttributeValue */)
111098 return emitLiteral(ts.cast(node, ts.isStringLiteral), /*jsxAttributeEscape*/ true);
111099 if (hint === 3 /* EmitHint.MappedTypeParameter */)
111100 return emitMappedTypeParameter(ts.cast(node, ts.isTypeParameterDeclaration));
111101 if (hint === 5 /* EmitHint.EmbeddedStatement */) {
111102 ts.Debug.assertNode(node, ts.isEmptyStatement);
111103 return emitEmptyStatement(/*isEmbeddedStatement*/ true);
111104 }
111105 if (hint === 4 /* EmitHint.Unspecified */) {
111106 switch (node.kind) {
111107 // Pseudo-literals
111108 case 15 /* SyntaxKind.TemplateHead */:
111109 case 16 /* SyntaxKind.TemplateMiddle */:
111110 case 17 /* SyntaxKind.TemplateTail */:
111111 return emitLiteral(node, /*jsxAttributeEscape*/ false);
111112 // Identifiers
111113 case 79 /* SyntaxKind.Identifier */:
111114 return emitIdentifier(node);
111115 // PrivateIdentifiers
111116 case 80 /* SyntaxKind.PrivateIdentifier */:
111117 return emitPrivateIdentifier(node);
111118 // Parse tree nodes
111119 // Names
111120 case 161 /* SyntaxKind.QualifiedName */:
111121 return emitQualifiedName(node);
111122 case 162 /* SyntaxKind.ComputedPropertyName */:
111123 return emitComputedPropertyName(node);
111124 // Signature elements
111125 case 163 /* SyntaxKind.TypeParameter */:
111126 return emitTypeParameter(node);
111127 case 164 /* SyntaxKind.Parameter */:
111128 return emitParameter(node);
111129 case 165 /* SyntaxKind.Decorator */:
111130 return emitDecorator(node);
111131 // Type members
111132 case 166 /* SyntaxKind.PropertySignature */:
111133 return emitPropertySignature(node);
111134 case 167 /* SyntaxKind.PropertyDeclaration */:
111135 return emitPropertyDeclaration(node);
111136 case 168 /* SyntaxKind.MethodSignature */:
111137 return emitMethodSignature(node);
111138 case 169 /* SyntaxKind.MethodDeclaration */:
111139 return emitMethodDeclaration(node);
111140 case 170 /* SyntaxKind.ClassStaticBlockDeclaration */:
111141 return emitClassStaticBlockDeclaration(node);
111142 case 171 /* SyntaxKind.Constructor */:

Callers 2

pipelineEmitWithHintFunction · 0.85
emitPlaceholderFunction · 0.85

Calls 15

emitSnippetNodeFunction · 0.85
emitSourceFileFunction · 0.85
emitIdentifierFunction · 0.85
emitLiteralFunction · 0.85
emitMappedTypeParameterFunction · 0.85
emitEmptyStatementFunction · 0.85
emitPrivateIdentifierFunction · 0.85
emitQualifiedNameFunction · 0.85
emitComputedPropertyNameFunction · 0.85
emitTypeParameterFunction · 0.85
emitParameterFunction · 0.85
emitDecoratorFunction · 0.85

Tested by

no test coverage detected