MCPcopy
hub / github.com/MadAppGang/dingo / SlicePattern

Struct SlicePattern

pkg/ast/pattern.go:99–103  ·  view source on GitHub ↗

SlicePattern represents slice/array pattern: [a, b, c] or [first, ...rest] Supports fixed and variable-length matching

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected