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

Struct RestPattern

pkg/ast/pattern.go:37–40  ·  view source on GitHub ↗

RestPattern represents rest pattern in slice/array: [a, b, ...rest] Matches remaining elements in sequence patterns

Source from the content-addressed store, hash-verified

35// RestPattern represents rest pattern in slice/array: [a, b, ...rest]
36// Matches remaining elements in sequence patterns
37type RestPattern struct {
38 Dots token.Pos // Position of '...'
39 Name *string // Optional variable name (nil for anonymous ...)
40}
41
42func (p *RestPattern) PatternNode() {}
43func (p *RestPattern) Pos() token.Pos {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected