Sets the range to use for a node when emitting comments.
(node *ast.Node, loc core.TextRange)
| 574 | |
| 575 | // Sets the range to use for a node when emitting comments. |
| 576 | func (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. |
| 583 | func (c *EmitContext) AssignCommentRange(to *ast.Node, from *ast.Node) { |
no test coverage detected