gotools/internal/astutil/clone.go

// CloneNode returns a deep copy of a Node.
// It omits pointers to ast.{Scope,Object} variables.
func CloneNode[T ast.Node](n T) T {}

func cloneNode(n ast.Node) ast.Node {}