filters

package
v0.0.0-...-9f34108 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncFilter

type FuncFilter struct {
	// contains filtered or unexported fields
}

FuncFilter implements a filter token which takes a token and filters its output according to a fuzzing function

func NewFuncFilter

func NewFuncFilter(
	tok token.Token,
	state interface{},
	permutationFunc func(state interface{}, tok token.Token, i uint) interface{},
	permutationsFunc func(state interface{}, tok token.Token) uint,
	permutationsAllFunc func(state interface{}, tok token.Token) uint,
	stringFunc func(state interface{}, tok token.Token) string,
) *FuncFilter

NewFuncFilter returns a new instance of a FuncFilter token give the referenced token, a fuzzing and a stringer function

func (*FuncFilter) Clone

func (f *FuncFilter) Clone() token.Token

Clone returns a copy of the token and all its children

func (*FuncFilter) Get

func (f *FuncFilter) Get() token.Token

Get returns the current referenced token

func (*FuncFilter) InternalGet

func (f *FuncFilter) InternalGet() token.Token

InternalGet returns the current referenced internal token

func (*FuncFilter) InternalLogicalRemove

func (f *FuncFilter) InternalLogicalRemove(tok token.Token) token.Token

InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.

func (*FuncFilter) InternalReplace

func (f *FuncFilter) InternalReplace(oldToken, newToken token.Token) error

InternalReplace replaces an old with a new internal token if it is referenced by this token. The error return argument is not nil, if the replacement is not suitable.

func (*FuncFilter) Parse

func (f *FuncFilter) Parse(pars *token.InternalParser, cur int) (int, []error)

Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.

func (*FuncFilter) Permutation

func (f *FuncFilter) Permutation(i uint) error

Permutation sets a specific permutation for this token

func (*FuncFilter) Permutations

func (f *FuncFilter) Permutations() uint

Permutations returns the number of permutations for this token

func (*FuncFilter) PermutationsAll

func (f *FuncFilter) PermutationsAll() uint

PermutationsAll returns the number of all possible permutations for this token including its children

func (*FuncFilter) String

func (f *FuncFilter) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL