Documentation
¶
Overview ¶
Package mutator provides mutation operators for the gorgon project.
Index ¶
- func All() map[string]Operator
- func ApplyOperator(op Operator, node ast.Node, returnType string, file *ast.File, ...) ast.Node
- func ListCategories() []string
- func Register(op Operator)
- type Context
- type ContextualOperator
- type Operator
- type OperatorInitializer
- type OperatorRegistry
- type TypeAwareOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyOperator ¶
func ListCategories ¶
func ListCategories() []string
Types ¶
type ContextualOperator ¶
type Operator ¶
type Operator interface {
Name() string
CanApply(node ast.Node) bool
Mutate(node ast.Node) ast.Node
}
func GetCategory ¶
type OperatorInitializer ¶
type OperatorInitializer func() Operator
type OperatorRegistry ¶
type OperatorRegistry struct {
// contains filtered or unexported fields
}
func NewOperatorRegistry ¶
func NewOperatorRegistry() *OperatorRegistry
func (*OperatorRegistry) All ¶
func (r *OperatorRegistry) All() map[string]Operator
func (*OperatorRegistry) List ¶
func (r *OperatorRegistry) List() []Operator
func (*OperatorRegistry) Register ¶
func (r *OperatorRegistry) Register(op Operator)
func (*OperatorRegistry) RegisterInitializer ¶
func (r *OperatorRegistry) RegisterInitializer(name string, init OperatorInitializer)
type TypeAwareOperator ¶
type TypeAwareOperator interface {
RequiresTypeCheck() bool
}
Directories
¶
| Path | Synopsis |
|---|---|
|
utilities used by mutation operators.
|
utilities used by mutation operators. |
|
operators
|
|
|
arithmetic_flip
Package arithmetic_flip provides arithmetic operator flip mutations.
|
Package arithmetic_flip provides arithmetic operator flip mutations. |
|
assignment_operator
Package assignment_operator provides assignment operator mutation operators.
|
Package assignment_operator provides assignment operator mutation operators. |
|
boundary_value
Package boundary_value provides boundary comparison mutation operators.
|
Package boundary_value provides boundary comparison mutation operators. |
|
condition_negation
Package condition_negation provides condition negation mutations.
|
Package condition_negation provides condition negation mutations. |
|
logical_operator
Package logical_operator provides logical operator replacement mutations.
|
Package logical_operator provides logical operator replacement mutations. |
|
Package tokens defines operator flip maps used by token-based mutation operators.
|
Package tokens defines operator flip maps used by token-based mutation operators. |
Click to show internal directories.
Click to hide internal directories.