Updates the NodeBase fields of astPtr to point to deep clones.
(astPtr Node)
| 54 | |
| 55 | // Updates the NodeBase fields of astPtr to point to deep clones. |
| 56 | func cloneNodeBase(astPtr Node) { |
| 57 | if astPtr.Context() != nil { |
| 58 | newContext := new(string) |
| 59 | *newContext = *astPtr.Context() |
| 60 | astPtr.SetContext(newContext) |
| 61 | } |
| 62 | astPtr.SetFreeVariables(append(make(Identifiers, 0), astPtr.FreeVariables()...)) |
| 63 | } |
| 64 | |
| 65 | func cloneCommaSeparatedExprs(list []CommaSeparatedExpr) []CommaSeparatedExpr { |
| 66 | r := append(make([]CommaSeparatedExpr, 0), list...) |
no test coverage detected
searching dependent graphs…