(node *ast.Node)
| 133 | type patcher struct{} |
| 134 | |
| 135 | func (patcher) Visit(node *ast.Node) { |
| 136 | switch id := (*node).(type) { |
| 137 | case *ast.IdentifierNode, *ast.MemberNode: |
| 138 | nodeType := id.Type() |
| 139 | for _, t := range supportedInterfaces { |
| 140 | if nodeType.Implements(t) { |
| 141 | ast.Patch(node, &ast.CallNode{ |
| 142 | Callee: &ast.IdentifierNode{Value: "$patcher_value_getter"}, |
| 143 | Arguments: []ast.Node{id}, |
| 144 | }) |
| 145 | return |
| 146 | } |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | func getValue(params ...any) (any, error) { |
| 152 | switch v := params[0].(type) { |
nothing calls this directly
no test coverage detected