evalFieldChain evaluates .X.Y.Z possibly followed by arguments. dot is the environment in which to evaluate arguments, while receiver is the value being walked along the chain.
(dot, receiver reflect.Value, node *expr.IdentityNode, ident []string, args []expr.Node, final reflect.Value)
| 88 | // dot is the environment in which to evaluate arguments, while |
| 89 | // receiver is the value being walked along the chain. |
| 90 | func (s *state) evalFieldChain(dot, receiver reflect.Value, node *expr.IdentityNode, ident []string, args []expr.Node, final reflect.Value) reflect.Value { |
| 91 | n := len(ident) |
| 92 | for i := 0; i < n-1; i++ { |
| 93 | receiver = s.evalField(dot, ident[i], node, nil, zero, receiver) |
| 94 | } |
| 95 | // Now if it's a method, it gets the arguments. |
| 96 | return s.evalField(dot, ident[n-1], node, args, final, receiver) |
| 97 | } |
| 98 | |
| 99 | // func (s *state) evalFunction(dot reflect.Value, node *expr.IdentityNode, cmd expr.Node, args []expr.Node, final reflect.Value) reflect.Value { |
| 100 | // name := node.Text |