SlicePattern represents slice/array pattern: [a, b, c] or [first, ...rest] Supports fixed and variable-length matching
| 97 | // SlicePattern represents slice/array pattern: [a, b, c] or [first, ...rest] |
| 98 | // Supports fixed and variable-length matching |
| 99 | type SlicePattern struct { |
| 100 | LBracket token.Pos // Position of '[' |
| 101 | Elements []Pattern // Elements (may include RestPattern) |
| 102 | RBracket token.Pos // Position of ']' |
| 103 | } |
| 104 | |
| 105 | func (p *SlicePattern) PatternNode() {} |
| 106 | func (p *SlicePattern) Pos() token.Pos { |
nothing calls this directly
no outgoing calls
no test coverage detected