(node *ast.Node)
| 600 | type patcher struct{} |
| 601 | |
| 602 | func (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 | |
| 612 | func ExamplePatch() { |
| 613 | program, err := expr.Compile( |