MCPcopy Index your code
hub / github.com/expr-lang/expr / Visit

Method Visit

patcher/value/value.go:135–149  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

133type patcher struct{}
134
135func (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
151func getValue(params ...any) (any, error) {
152 switch v := params[0].(type) {

Callers

nothing calls this directly

Calls 3

PatchFunction · 0.92
TypeMethod · 0.65
ImplementsMethod · 0.45

Tested by

no test coverage detected