Documentation
¶
Index ¶
- Constants
- func GetBoolParam(params []NamedParameter, name string, defaultValue bool) bool
- func GetDurationParam(params []NamedParameter, name string, defaultValue time.Duration) time.Duration
- func GetIntParam(params []NamedParameter, name string, defaultValue int) int
- func GetStringParam(params []NamedParameter, name string, defaultValue string) string
- func IsPatternDecorator(decoratorName string) bool
- func ValidatePatternDecorator(pattern *PatternDecorator) []error
- func ValidatePatternDecorators(program *Program) []error
- func ValidateVariableReferences(program *Program) []error
- func Walk(node Node, fn func(Node) bool)
- type ActionDecorator
- type BlockDecorator
- type BooleanLiteral
- type CommandBody
- func (b *CommandBody) GetAllPatternContent() []*PatternContent
- func (b *CommandBody) GetAllShellContent() []*ShellContent
- func (b *CommandBody) GetInlineDecorators() []*ValueDecorator
- func (b *CommandBody) GetShellText() string
- func (b *CommandBody) IsSimpleCommand() bool
- func (b *CommandBody) Position() Position
- func (b *CommandBody) SemanticTokens() []types.Token
- func (b *CommandBody) String() string
- func (b *CommandBody) TokenRange() TokenRange
- type CommandContent
- type CommandDecl
- type CommandType
- type DurationLiteral
- type Expression
- type ExpressionType
- type Identifier
- type IdentifierPattern
- func (i *IdentifierPattern) GetPatternType() PatternType
- func (i *IdentifierPattern) IsPattern() bool
- func (i *IdentifierPattern) Position() Position
- func (i *IdentifierPattern) SemanticTokens() []types.Token
- func (i *IdentifierPattern) String() string
- func (i *IdentifierPattern) TokenRange() TokenRange
- type NamedParameter
- type Node
- type NumberLiteral
- type Pattern
- type PatternBranch
- type PatternContent
- type PatternDecorator
- type PatternType
- type Position
- type Program
- type ShellContent
- type ShellPart
- type StringLiteral
- type TextPart
- type TokenRange
- type ValueDecorator
- func (v *ValueDecorator) GetType() ExpressionType
- func (v *ValueDecorator) IsExpression() bool
- func (v *ValueDecorator) IsShellPart() bool
- func (v *ValueDecorator) Position() Position
- func (v *ValueDecorator) SemanticTokens() []types.Token
- func (v *ValueDecorator) String() string
- func (v *ValueDecorator) TokenRange() TokenRange
- type VarGroup
- type VariableDecl
- type WildcardPattern
Constants ¶
const ( StringType = types.StringType NumberType = types.NumberType DurationType = types.DurationType IdentifierType = types.IdentifierType BooleanType = types.BooleanType )
Variables ¶
This section is empty.
Functions ¶
func GetBoolParam ¶
func GetBoolParam(params []NamedParameter, name string, defaultValue bool) bool
GetBoolParam retrieves a boolean parameter value with default fallback
func GetDurationParam ¶
func GetDurationParam(params []NamedParameter, name string, defaultValue time.Duration) time.Duration
GetDurationParam retrieves a duration parameter value with default fallback
func GetIntParam ¶
func GetIntParam(params []NamedParameter, name string, defaultValue int) int
GetIntParam retrieves an integer parameter value with default fallback
func GetStringParam ¶
func GetStringParam(params []NamedParameter, name string, defaultValue string) string
GetStringParam retrieves a string parameter value with default fallback
func IsPatternDecorator ¶
IsPatternDecorator checks if a decorator is a pattern-matching decorator
func ValidatePatternDecorator ¶
func ValidatePatternDecorator(pattern *PatternDecorator) []error
ValidatePatternDecorator validates pattern-matching decorator content
func ValidatePatternDecorators ¶
ValidatePatternDecorators validates all pattern decorators in the program
func ValidateVariableReferences ¶
ValidateVariableReferences checks that all @var() decorator references are defined
Types ¶
type ActionDecorator ¶
type ActionDecorator struct {
Name string
Args []NamedParameter
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting and LSP
AtToken types.Token // The "@" symbol
NameToken types.Token // The decorator name token
OpenParen *types.Token // The "(" token (nil if no args)
CloseParen *types.Token // The ")" token (nil if no args)
}
ActionDecorator represents standalone decorators that execute commands Examples: @cmd(helper) - these appear as standalone CommandContent
func (*ActionDecorator) IsCommandContent ¶
func (a *ActionDecorator) IsCommandContent() bool
func (*ActionDecorator) IsShellPart ¶
func (a *ActionDecorator) IsShellPart() bool
func (*ActionDecorator) Position ¶
func (a *ActionDecorator) Position() Position
func (*ActionDecorator) SemanticTokens ¶
func (a *ActionDecorator) SemanticTokens() []types.Token
func (*ActionDecorator) String ¶
func (a *ActionDecorator) String() string
func (*ActionDecorator) TokenRange ¶
func (a *ActionDecorator) TokenRange() TokenRange
type BlockDecorator ¶
type BlockDecorator struct {
Name string // Decorator name: "parallel", "timeout", "retry"
Args []NamedParameter // Arguments within parentheses
Content []CommandContent // The commands inside the decorator block
Pos Position
Tokens TokenRange
// LSP support
AtToken types.Token
NameToken types.Token
}
BlockDecorator represents block decorators like @parallel, @timeout, @retry This handles cases like: @parallel { cmd1; cmd2 } or @timeout(30s) { npm start }
func NewBlockDecorator ¶
func NewBlockDecorator(name string, args []NamedParameter, content []CommandContent) *BlockDecorator
NewBlockDecorator creates a block decorator node
func (*BlockDecorator) IsCommandContent ¶
func (d *BlockDecorator) IsCommandContent() bool
func (*BlockDecorator) Position ¶
func (d *BlockDecorator) Position() Position
func (*BlockDecorator) SemanticTokens ¶
func (d *BlockDecorator) SemanticTokens() []types.Token
func (*BlockDecorator) String ¶
func (d *BlockDecorator) String() string
func (*BlockDecorator) TokenRange ¶
func (d *BlockDecorator) TokenRange() TokenRange
type BooleanLiteral ¶
type BooleanLiteral struct {
Value bool // The boolean value
Raw string // The raw string ("true" or "false")
Pos Position
Tokens TokenRange
Token types.Token
}
BooleanLiteral represents boolean values (true/false)
func (*BooleanLiteral) GetType ¶
func (b *BooleanLiteral) GetType() ExpressionType
func (*BooleanLiteral) IsExpression ¶
func (b *BooleanLiteral) IsExpression() bool
func (*BooleanLiteral) Position ¶
func (b *BooleanLiteral) Position() Position
func (*BooleanLiteral) SemanticTokens ¶
func (b *BooleanLiteral) SemanticTokens() []types.Token
func (*BooleanLiteral) String ¶
func (b *BooleanLiteral) String() string
func (*BooleanLiteral) TokenRange ¶
func (b *BooleanLiteral) TokenRange() TokenRange
type CommandBody ¶
type CommandBody struct {
Content []CommandContent // Multiple content items within the command body
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting
OpenBrace *types.Token // The "{" token (nil for simple commands)
CloseBrace *types.Token // The "}" token (nil for simple commands)
}
CommandBody represents the unified body of a command with concrete syntax preservation Now supports multiple content items for complex command structures
func (*CommandBody) GetAllPatternContent ¶
func (b *CommandBody) GetAllPatternContent() []*PatternContent
GetAllPatternContent returns all pattern content from the command body
func (*CommandBody) GetAllShellContent ¶
func (b *CommandBody) GetAllShellContent() []*ShellContent
GetAllShellContent returns all shell content from the command body
func (*CommandBody) GetInlineDecorators ¶
func (b *CommandBody) GetInlineDecorators() []*ValueDecorator
GetInlineDecorators returns all inline value decorators within shell content
func (*CommandBody) GetShellText ¶
func (b *CommandBody) GetShellText() string
GetShellText returns the shell text if this is a simple shell command
func (*CommandBody) IsSimpleCommand ¶
func (b *CommandBody) IsSimpleCommand() bool
IsSimpleCommand checks if a command body represents a simple (non-decorated) command
func (*CommandBody) Position ¶
func (b *CommandBody) Position() Position
func (*CommandBody) SemanticTokens ¶
func (b *CommandBody) SemanticTokens() []types.Token
func (*CommandBody) String ¶
func (b *CommandBody) String() string
func (*CommandBody) TokenRange ¶
func (b *CommandBody) TokenRange() TokenRange
type CommandContent ¶
CommandContent represents the content within a command body
type CommandDecl ¶
type CommandDecl struct {
Name string
Type CommandType
Body CommandBody
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting and LSP
TypeToken *types.Token // The watch/stop keyword (nil for regular commands)
NameToken types.Token // The command name token
ColonToken types.Token // The ":" token
}
CommandDecl represents command definitions with concrete syntax preservation
func Cmd ¶
func Cmd(name string, body CommandContent) CommandDecl
Cmd creates a simple command: NAME: BODY
func (*CommandDecl) Position ¶
func (c *CommandDecl) Position() Position
func (*CommandDecl) SemanticTokens ¶
func (c *CommandDecl) SemanticTokens() []types.Token
func (*CommandDecl) String ¶
func (c *CommandDecl) String() string
func (*CommandDecl) TokenRange ¶
func (c *CommandDecl) TokenRange() TokenRange
type CommandType ¶
type CommandType int
CommandType represents the type of command
const ( Command CommandType = iota WatchCommand StopCommand )
func (CommandType) String ¶
func (ct CommandType) String() string
type DurationLiteral ¶
type DurationLiteral struct {
Value string
Pos Position
Tokens TokenRange
Token types.Token
}
DurationLiteral represents duration values like 30s, 5m
func (*DurationLiteral) GetType ¶
func (d *DurationLiteral) GetType() ExpressionType
func (*DurationLiteral) IsExpression ¶
func (d *DurationLiteral) IsExpression() bool
func (*DurationLiteral) Position ¶
func (d *DurationLiteral) Position() Position
func (*DurationLiteral) SemanticTokens ¶
func (d *DurationLiteral) SemanticTokens() []types.Token
func (*DurationLiteral) String ¶
func (d *DurationLiteral) String() string
func (*DurationLiteral) TokenRange ¶
func (d *DurationLiteral) TokenRange() TokenRange
type Expression ¶
type Expression interface {
Node
IsExpression() bool
GetType() types.ExpressionType
}
Expression represents any expression (literals, identifiers, etc.)
type ExpressionType ¶
type ExpressionType = types.ExpressionType
Use types from the shared types package
type Identifier ¶
type Identifier struct {
Name string
Pos Position
Tokens TokenRange
Token types.Token
}
Identifier represents identifiers
func (*Identifier) GetType ¶
func (i *Identifier) GetType() ExpressionType
func (*Identifier) IsExpression ¶
func (i *Identifier) IsExpression() bool
func (*Identifier) Position ¶
func (i *Identifier) Position() Position
func (*Identifier) SemanticTokens ¶
func (i *Identifier) SemanticTokens() []types.Token
func (*Identifier) String ¶
func (i *Identifier) String() string
func (*Identifier) TokenRange ¶
func (i *Identifier) TokenRange() TokenRange
type IdentifierPattern ¶
type IdentifierPattern struct {
Name string
Pos Position
Tokens TokenRange
Token types.Token
}
IdentifierPattern represents named patterns like "production", "main", "error"
func NewIdentifierPattern ¶
func NewIdentifierPattern(name string) *IdentifierPattern
NewIdentifierPattern creates an identifier pattern
func (*IdentifierPattern) GetPatternType ¶
func (i *IdentifierPattern) GetPatternType() PatternType
func (*IdentifierPattern) IsPattern ¶
func (i *IdentifierPattern) IsPattern() bool
func (*IdentifierPattern) Position ¶
func (i *IdentifierPattern) Position() Position
func (*IdentifierPattern) SemanticTokens ¶
func (i *IdentifierPattern) SemanticTokens() []types.Token
func (*IdentifierPattern) String ¶
func (i *IdentifierPattern) String() string
func (*IdentifierPattern) TokenRange ¶
func (i *IdentifierPattern) TokenRange() TokenRange
type NamedParameter ¶
type NamedParameter struct {
Name string // Parameter name (e.g., "concurrency", "failOnFirstError")
Value Expression // Parameter value
Pos Position
Tokens TokenRange
// Concrete syntax tokens for LSP support
NameToken *types.Token // The parameter name token (nil for positional args)
EqualsToken *types.Token // The "=" token (nil for positional args)
}
NamedParameter represents a named parameter in decorator arguments Supports both named syntax (name = value) and positional (resolved by parser)
func FindParameter ¶
func FindParameter(params []NamedParameter, name string) *NamedParameter
FindParameter searches for a parameter by name in the slice
func Param ¶
func Param(name string, value Expression) NamedParameter
Param creates a named parameter for decorators
func UnnamedParam ¶
func UnnamedParam(value Expression) NamedParameter
UnnamedParam creates an unnamed parameter (positional)
func (NamedParameter) IsNamed ¶
func (n NamedParameter) IsNamed() bool
IsNamed returns true if this parameter was specified with a name
func (NamedParameter) Position ¶
func (n NamedParameter) Position() Position
func (NamedParameter) SemanticTokens ¶
func (n NamedParameter) SemanticTokens() []types.Token
func (NamedParameter) String ¶
func (n NamedParameter) String() string
func (NamedParameter) TokenRange ¶
func (n NamedParameter) TokenRange() TokenRange
type Node ¶
type Node interface {
String() string
Position() Position
TokenRange() TokenRange
SemanticTokens() []types.Token
}
Node represents any node in the AST
type NumberLiteral ¶
type NumberLiteral struct {
Value string
Pos Position
Tokens TokenRange
Token types.Token
}
NumberLiteral represents numeric values
func (*NumberLiteral) GetType ¶
func (n *NumberLiteral) GetType() ExpressionType
func (*NumberLiteral) IsExpression ¶
func (n *NumberLiteral) IsExpression() bool
func (*NumberLiteral) Position ¶
func (n *NumberLiteral) Position() Position
func (*NumberLiteral) SemanticTokens ¶
func (n *NumberLiteral) SemanticTokens() []types.Token
func (*NumberLiteral) String ¶
func (n *NumberLiteral) String() string
func (*NumberLiteral) TokenRange ¶
func (n *NumberLiteral) TokenRange() TokenRange
type Pattern ¶
type Pattern interface {
Node
IsPattern() bool
GetPatternType() PatternType
}
Pattern represents a pattern in pattern-matching decorators
type PatternBranch ¶
type PatternBranch struct {
Pattern Pattern // The pattern identifier or wildcard
Commands []CommandContent // The commands to execute for this pattern (supports multiple)
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting and LSP
ColonToken types.Token // The ":" token separating pattern from command
}
PatternBranch represents a single pattern branch in pattern-matching decorators Examples: "production: deploy.sh", "main: npm start", "*: default.sh" Supports multiple commands per pattern when using newlines
func FindPatternBranches ¶
func FindPatternBranches(node Node, decoratorName string) []*PatternBranch
FindPatternBranches finds all pattern branches for a specific decorator
func GetPatternBranchForPattern ¶
func GetPatternBranchForPattern(patternDecorator *PatternDecorator, patternName string) *PatternBranch
GetPatternBranchForPattern finds a specific pattern branch within pattern content GetPatternBranchForPattern finds a pattern branch for a specific pattern name
func NewPatternBranch ¶
func NewPatternBranch(pattern Pattern, commands []CommandContent) PatternBranch
NewPatternBranch creates a pattern branch
func (*PatternBranch) Position ¶
func (b *PatternBranch) Position() Position
func (*PatternBranch) SemanticTokens ¶
func (b *PatternBranch) SemanticTokens() []types.Token
func (*PatternBranch) String ¶
func (b *PatternBranch) String() string
func (*PatternBranch) TokenRange ¶
func (b *PatternBranch) TokenRange() TokenRange
type PatternContent ¶
type PatternContent struct {
Pattern string // The pattern string (e.g., "production", "main", "*")
Commands []CommandContent // The commands to execute for this pattern
Pos Position
Tokens TokenRange
}
PatternContent represents a simple pattern with commands Simplified to just Pattern and Commands
func (*PatternContent) IsCommandContent ¶
func (p *PatternContent) IsCommandContent() bool
func (*PatternContent) Position ¶
func (p *PatternContent) Position() Position
func (*PatternContent) SemanticTokens ¶
func (p *PatternContent) SemanticTokens() []types.Token
func (*PatternContent) String ¶
func (p *PatternContent) String() string
func (*PatternContent) TokenRange ¶
func (p *PatternContent) TokenRange() TokenRange
type PatternDecorator ¶
type PatternDecorator struct {
Name string // Decorator name: "when", "try"
Args []NamedParameter // Arguments within parentheses (e.g., variable for @when)
Patterns []PatternBranch // Pattern branches inside the decorator block
Pos Position
Tokens TokenRange
// LSP support
AtToken types.Token
NameToken types.Token
}
PatternDecorator represents pattern decorators like @when, @try This handles cases like: @when(MODE) { production: deploy.sh; staging: deploy-staging.sh }
func GetPatternDecorators ¶
func GetPatternDecorators(node Node) []*PatternDecorator
GetPatternDecorators returns all pattern decorators in the AST
func GetPatternDecoratorsByName ¶
func GetPatternDecoratorsByName(node Node, decoratorName string) []*PatternDecorator
GetPatternDecoratorsByName finds pattern decorators for a specific decorator type
func NewPatternDecorator ¶
func NewPatternDecorator(name string, args []NamedParameter, patterns []PatternBranch) *PatternDecorator
NewPatternDecorator creates a pattern decorator node
func (*PatternDecorator) IsCommandContent ¶
func (d *PatternDecorator) IsCommandContent() bool
func (*PatternDecorator) Position ¶
func (d *PatternDecorator) Position() Position
func (*PatternDecorator) SemanticTokens ¶
func (d *PatternDecorator) SemanticTokens() []types.Token
func (*PatternDecorator) String ¶
func (d *PatternDecorator) String() string
func (*PatternDecorator) TokenRange ¶
func (d *PatternDecorator) TokenRange() TokenRange
type PatternType ¶
type PatternType int
PatternType represents the type of pattern
const ( IdentifierPatternType PatternType = iota // Named patterns like "production", "main" WildcardPatternType // Wildcard pattern "*" )
func (PatternType) String ¶
func (pt PatternType) String() string
type Program ¶
type Program struct {
Variables []VariableDecl
VarGroups []VarGroup // Grouped variable declarations: var ( ... )
Commands []CommandDecl
Pos Position
Tokens TokenRange
}
Program represents the root of the CST (entire devcmd file) Preserves concrete syntax for LSP, Tree-sitter, and formatting tools
func NewProgram ¶
func NewProgram(items ...interface{}) *Program
NewProgram creates a program AST node
func (*Program) SemanticTokens ¶
func (*Program) TokenRange ¶
func (p *Program) TokenRange() TokenRange
type ShellContent ¶
type ShellContent struct {
Parts []ShellPart // Mixed content: text and inline decorators
Pos Position
Tokens TokenRange
}
ShellContent represents shell command content with potential inline decorators This supports mixed content like: echo "Building on port @var(PORT)"
func (*ShellContent) IsCommandContent ¶
func (s *ShellContent) IsCommandContent() bool
func (*ShellContent) Position ¶
func (s *ShellContent) Position() Position
func (*ShellContent) SemanticTokens ¶
func (s *ShellContent) SemanticTokens() []types.Token
func (*ShellContent) String ¶
func (s *ShellContent) String() string
func (*ShellContent) TokenRange ¶
func (s *ShellContent) TokenRange() TokenRange
type StringLiteral ¶
type StringLiteral struct {
Value string
Raw string
Pos Position
Tokens TokenRange
StringToken types.Token
}
StringLiteral represents string values
func (*StringLiteral) GetType ¶
func (s *StringLiteral) GetType() ExpressionType
func (*StringLiteral) IsExpression ¶
func (s *StringLiteral) IsExpression() bool
func (*StringLiteral) Position ¶
func (s *StringLiteral) Position() Position
func (*StringLiteral) SemanticTokens ¶
func (s *StringLiteral) SemanticTokens() []types.Token
func (*StringLiteral) String ¶
func (s *StringLiteral) String() string
func (*StringLiteral) TokenRange ¶
func (s *StringLiteral) TokenRange() TokenRange
type TextPart ¶
type TextPart struct {
Text string
Pos Position
Tokens TokenRange
}
TextPart represents plain text within shell content
func (*TextPart) IsShellPart ¶
func (*TextPart) SemanticTokens ¶
func (*TextPart) TokenRange ¶
func (t *TextPart) TokenRange() TokenRange
type TokenRange ¶
TokenRange represents the span of tokens for this AST node
type ValueDecorator ¶
type ValueDecorator struct {
Name string
Args []NamedParameter
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting and LSP
AtToken types.Token // The "@" symbol
NameToken types.Token // The decorator name token
OpenParen *types.Token // The "(" token (nil if no args)
CloseParen *types.Token // The ")" token (nil if no args)
}
ValueDecorator represents inline decorators that provide values for shell interpolation Examples: @var(NAME), @env(VAR) - these appear WITHIN shell content and return values
func At ¶
func At(name string, args ...NamedParameter) *ValueDecorator
At creates a value decorator within shell content: @var(NAME)
func FindVariableReferences ¶
func FindVariableReferences(node Node) []*ValueDecorator
FindVariableReferences finds all @var() value decorator references in the AST
func GetReferencesForVariable ¶
func GetReferencesForVariable(program *Program, varName string) []*ValueDecorator
GetReferencesForVariable finds all @var() value decorator references to a specific variable
func (*ValueDecorator) GetType ¶
func (v *ValueDecorator) GetType() ExpressionType
func (*ValueDecorator) IsExpression ¶
func (v *ValueDecorator) IsExpression() bool
func (*ValueDecorator) IsShellPart ¶
func (v *ValueDecorator) IsShellPart() bool
func (*ValueDecorator) Position ¶
func (v *ValueDecorator) Position() Position
func (*ValueDecorator) SemanticTokens ¶
func (v *ValueDecorator) SemanticTokens() []types.Token
func (*ValueDecorator) String ¶
func (v *ValueDecorator) String() string
func (*ValueDecorator) TokenRange ¶
func (v *ValueDecorator) TokenRange() TokenRange
type VarGroup ¶
type VarGroup struct {
Variables []VariableDecl
Pos Position
Tokens TokenRange
// Concrete syntax tokens for precise formatting
VarToken types.Token // The "var" keyword
OpenParen types.Token // The "(" token
CloseParen types.Token // The ")" token
}
VarGroup represents grouped variable declarations: var ( NAME = value; ANOTHER = value ) Preserves the concrete syntax for formatting and LSP features
func (*VarGroup) SemanticTokens ¶
func (*VarGroup) TokenRange ¶
func (g *VarGroup) TokenRange() TokenRange
type VariableDecl ¶
type VariableDecl struct {
Name string
Value Expression
Pos Position
Tokens TokenRange
// LSP-specific information
NameToken types.Token
ValueToken types.Token
}
VariableDecl represents variable declarations (both individual and grouped)
func GetDefinitionForVariable ¶
func GetDefinitionForVariable(program *Program, varName string) *VariableDecl
GetDefinitionForVariable finds the variable declaration for a given reference
func Var ¶
func Var(name string, value Expression) VariableDecl
Var creates a variable declaration: var NAME = VALUE
func (*VariableDecl) Position ¶
func (v *VariableDecl) Position() Position
func (*VariableDecl) SemanticTokens ¶
func (v *VariableDecl) SemanticTokens() []types.Token
func (*VariableDecl) String ¶
func (v *VariableDecl) String() string
func (*VariableDecl) TokenRange ¶
func (v *VariableDecl) TokenRange() TokenRange
type WildcardPattern ¶
type WildcardPattern struct {
Pos Position
Tokens TokenRange
Token types.Token
}
WildcardPattern represents the wildcard pattern "*"
func (*WildcardPattern) GetPatternType ¶
func (w *WildcardPattern) GetPatternType() PatternType
func (*WildcardPattern) IsPattern ¶
func (w *WildcardPattern) IsPattern() bool
func (*WildcardPattern) Position ¶
func (w *WildcardPattern) Position() Position
func (*WildcardPattern) SemanticTokens ¶
func (w *WildcardPattern) SemanticTokens() []types.Token
func (*WildcardPattern) String ¶
func (w *WildcardPattern) String() string
func (*WildcardPattern) TokenRange ¶
func (w *WildcardPattern) TokenRange() TokenRange