(a *ast.AST, targetID, updatedID int64)
| 311 | } |
| 312 | |
| 313 | func updateMetadata(a *ast.AST, targetID, updatedID int64) { |
| 314 | if a == nil { |
| 315 | return |
| 316 | } |
| 317 | if ref, found := a.ReferenceMap()[updatedID]; found { |
| 318 | a.ReferenceMap()[targetID] = ref |
| 319 | } else { |
| 320 | delete(a.ReferenceMap(), targetID) |
| 321 | } |
| 322 | if t, found := a.TypeMap()[updatedID]; found { |
| 323 | a.TypeMap()[targetID] = t |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | func isBoolType(a *ast.AST, e ast.Expr) bool { |
| 328 | if a != nil && a.GetType(e.ID()) == types.BoolType { |