Pattern is the interface for all pattern types
| 66 | |
| 67 | // Pattern is the interface for all pattern types |
| 68 | type Pattern interface { |
| 69 | PatternNode() // Marker method |
| 70 | Pos() token.Pos // Start position |
| 71 | End() token.Pos // End position |
| 72 | String() string // String representation |
| 73 | HasBindings() bool // Does pattern bind variables? |
| 74 | GetBindings() []Binding // Extract all bindings (recursive for nested) |
| 75 | } |
| 76 | |
| 77 | // Binding represents a variable binding in a pattern |
| 78 | type Binding struct { |
no outgoing calls
no test coverage detected