Find returns the index of the given variable, or -1 if not found.
(v ast.Variable)
| 53 | |
| 54 | // Find returns the index of the given variable, or -1 if not found. |
| 55 | func (vs VarList) Find(v ast.Variable) int { |
| 56 | for i, u := range vs.Vars { |
| 57 | if u.Symbol == v.Symbol { |
| 58 | return i |
| 59 | } |
| 60 | } |
| 61 | return -1 |
| 62 | } |
no outgoing calls