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

Method onClone

internal/printer/emitcontext.go:79–87  ·  view source on GitHub ↗
(updated *ast.Node, original *ast.Node)

Source from the content-addressed store, hash-verified

77}
78
79func (c *EmitContext) onClone(updated *ast.Node, original *ast.Node) {
80 c.SetOriginal(updated, original)
81 if ast.IsIdentifier(updated) || ast.IsPrivateIdentifier(updated) {
82 if autoGenerate := c.autoGenerate[original]; autoGenerate != nil {
83 autoGenerateCopy := *autoGenerate
84 c.autoGenerate[updated] = &autoGenerateCopy
85 }
86 }
87}
88
89// Creates a new NodeVisitor attached to this EmitContext
90func (c *EmitContext) NewNodeVisitor(visit func(node *ast.Node) *ast.Node) *ast.NodeVisitor {

Callers

nothing calls this directly

Calls 3

SetOriginalMethod · 0.95
IsIdentifierFunction · 0.92
IsPrivateIdentifierFunction · 0.92

Tested by

no test coverage detected