MCPcopy Index your code
hub / github.com/microsoft/typescript-go / CommentRange

Method CommentRange

internal/printer/emitcontext.go:568–573  ·  view source on GitHub ↗

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

(node *ast.Node)

Source from the content-addressed store, hash-verified

566
567// Gets the range to use for a node when emitting comments.
568func (c *EmitContext) CommentRange(node *ast.Node) core.TextRange {
569 if emitNode := c.emitNodes.TryGet(node); emitNode != nil && emitNode.flags&hasCommentRange != 0 {
570 return emitNode.commentRange
571 }
572 return node.Loc
573}
574
575// Sets the range to use for a node when emitting comments.
576func (c *EmitContext) SetCommentRange(node *ast.Node, loc core.TextRange) {

Callers 9

AssignCommentRangeMethod · 0.95
emitImportAttributeMethod · 0.80
emitListItemsMethod · 0.80
isIgnorableParenMethod · 0.80
transformAutoAccessorMethod · 0.80

Calls 1

TryGetMethod · 0.80

Tested by

no test coverage detected