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

Interface Pattern

pkg/ast/match.go:68–75  ·  view source on GitHub ↗

Pattern is the interface for all pattern types

Source from the content-addressed store, hash-verified

66
67// Pattern is the interface for all pattern types
68type 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
78type Binding struct {

Callers 17

EndMethod · 0.65
EndMethod · 0.65
EndMethod · 0.65
StringMethod · 0.65
StringMethod · 0.65
StringMethod · 0.65
HasBindingsMethod · 0.65
HasBindingsMethod · 0.65
HasBindingsMethod · 0.65
HasBindingsMethod · 0.65
HasBindingsMethod · 0.65

Implementers 10

ConstructorPatternpkg/ast/match.go
TuplePatternpkg/ast/match.go
VariablePatternpkg/ast/match.go
WildcardPatternpkg/ast/match.go
LiteralPatternpkg/ast/match.go
OrPatternpkg/ast/pattern.go
RestPatternpkg/ast/pattern.go
RangePatternpkg/ast/pattern.go
SlicePatternpkg/ast/pattern.go
StructFieldPatternpkg/ast/pattern.go

Calls

no outgoing calls

Tested by

no test coverage detected