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

Function emitTrailingCommentOfPosition

test/fixtures/snapshot/typescript.js:114952–114965  ·  view source on GitHub ↗
(commentPos, commentEnd, _kind, hasTrailingNewLine)

Source from the content-addressed store, hash-verified

114950 }
114951 }
114952 function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
114953 if (!currentSourceFile)
114954 return;
114955 // trailing comments of a position are emitted at /*trailing comment1 */space/*trailing comment*/space
114956 emitPos(commentPos);
114957 ts.writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);
114958 emitPos(commentEnd);
114959 if (hasTrailingNewLine) {
114960 writer.writeLine();
114961 }
114962 else {
114963 writer.writeSpace(" ");
114964 }
114965 }
114966 function forEachLeadingCommentToEmit(pos, cb) {
114967 // Emit the leading comments only if the container's pos doesn't match because the container should take care of emitting these comments
114968 if (currentSourceFile && (containerPos === -1 || pos !== containerPos)) {

Callers

nothing calls this directly

Calls 2

emitPosFunction · 0.85
getCurrentLineMapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…