MCPcopy Create free account
hub / github.com/microsoft/typescript-go / SetCommentRange

Method SetCommentRange

internal/printer/emitcontext.go:576–580  ·  view source on GitHub ↗

Sets the range to use for a node when emitting comments.

(node *ast.Node, loc core.TextRange)

Source from the content-addressed store, hash-verified

574
575// Sets the range to use for a node when emitting comments.
576func (c *EmitContext) SetCommentRange(node *ast.Node, loc core.TextRange) {
577 emitNode := c.emitNodes.Get(node)
578 emitNode.commentRange = loc
579 emitNode.flags |= hasCommentRange
580}
581
582// Sets the range to use for a node when emitting comments.
583func (c *EmitContext) AssignCommentRange(to *ast.Node, from *ast.Node) {

Callers 15

AssignCommentRangeMethod · 0.95
pseudoTypeToNodeMethod · 0.80
createExportStatementMethod · 0.80
hoistClassDeclarationMethod · 0.80
visitIdentifierMethod · 0.80
transformAutoAccessorMethod · 0.80

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected