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

Method Visit

expr_test.go:602–610  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

600type patcher struct{}
601
602func (p *patcher) Visit(node *ast.Node) {
603 switch n := (*node).(type) {
604 case *ast.MemberNode:
605 ast.Patch(node, &ast.CallNode{
606 Callee: &ast.IdentifierNode{Value: "get"},
607 Arguments: []ast.Node{n.Node, n.Property},
608 })
609 }
610}
611
612func ExamplePatch() {
613 program, err := expr.Compile(

Callers

nothing calls this directly

Calls 1

PatchFunction · 0.92

Tested by

no test coverage detected