Documentation
¶
Index ¶
- type Variable
- func (v *Variable) Clone() token.Token
- func (v *Variable) Get() token.Token
- func (v *Variable) Index() int
- func (v *Variable) InternalGet() token.Token
- func (v *Variable) InternalLogicalRemove(tok token.Token) token.Token
- func (v *Variable) InternalReplace(oldToken, newToken token.Token) error
- func (v *Variable) Len() int
- func (v *Variable) Name() string
- func (v *Variable) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (v *Variable) Permutation(i uint) error
- func (v *Variable) Permutations() uint
- func (v *Variable) PermutationsAll() uint
- func (v *Variable) SetScope(variableScope *token.VariableScope)
- func (v *Variable) String() string
- type VariableItem
- func (v *VariableItem) Clone() token.Token
- func (v *VariableItem) Follow() bool
- func (v *VariableItem) Get() token.Token
- func (v *VariableItem) Index() int
- func (v *VariableItem) InternalGet() token.Token
- func (v *VariableItem) InternalLogicalRemove(tok token.Token) token.Token
- func (v *VariableItem) InternalReplace(oldToken, newToken token.Token) error
- func (v *VariableItem) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (v *VariableItem) Permutation(i uint) error
- func (v *VariableItem) Permutations() uint
- func (v *VariableItem) PermutationsAll() uint
- func (v *VariableItem) SetScope(variableScope *token.VariableScope)
- func (v *VariableItem) String() string
- type VariableReference
- func (v *VariableReference) Clone() token.Token
- func (v *VariableReference) Follow() bool
- func (v *VariableReference) Index() int
- func (v *VariableReference) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (v *VariableReference) Permutation(i uint) error
- func (v *VariableReference) Permutations() uint
- func (v *VariableReference) PermutationsAll() uint
- func (v *VariableReference) Reference() token.Token
- func (v *VariableReference) SetScope(variableScope *token.VariableScope)
- func (v *VariableReference) String() string
- type VariableSave
- type VariableValue
- func (v *VariableValue) Clone() token.Token
- func (v *VariableValue) Get() token.Token
- func (v *VariableValue) Index() int
- func (v *VariableValue) InternalGet() token.Token
- func (v *VariableValue) InternalLogicalRemove(tok token.Token) token.Token
- func (v *VariableValue) InternalReplace(oldToken, newToken token.Token) error
- func (v *VariableValue) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (v *VariableValue) Permutation(i uint) error
- func (v *VariableValue) Permutations() uint
- func (v *VariableValue) PermutationsAll() uint
- func (v *VariableValue) SetScope(variableScope *token.VariableScope)
- func (v *VariableValue) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Variable ¶
type Variable struct {
// contains filtered or unexported fields
}
Variable implements general variable token which references a token as its value and forwards all token functions to its token.
func NewVariable ¶
NewVariable returns a new instance of a Variable token
func (*Variable) InternalGet ¶
InternalGet returns the current referenced internal token
func (*Variable) InternalLogicalRemove ¶
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*Variable) InternalReplace ¶
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 (*Variable) Parse ¶
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 (*Variable) Permutation ¶
Permutation sets a specific permutation for this token
func (*Variable) Permutations ¶
Permutations returns the number of permutations for this token
func (*Variable) PermutationsAll ¶
PermutationsAll returns the number of all possible permutations for this token including its children
func (*Variable) SetScope ¶
func (v *Variable) SetScope(variableScope *token.VariableScope)
SetScope sets the scope of the token
type VariableItem ¶
type VariableItem struct {
// contains filtered or unexported fields
}
VariableItem implements a token which references a Variable token to output its referenced token
func NewVariableItem ¶
func NewVariableItem(index token.Token, variable token.VariableToken) *VariableItem
NewVariableItem returns a new instance of a VariableItem token
func (*VariableItem) Clone ¶
func (v *VariableItem) Clone() token.Token
Clone returns a copy of the token and all its children
func (*VariableItem) Follow ¶
func (v *VariableItem) Follow() bool
Follow returns if the children of the token should be traversed
func (*VariableItem) Get ¶
func (v *VariableItem) Get() token.Token
Get returns the current referenced token
func (*VariableItem) Index ¶
func (v *VariableItem) Index() int
Index returns the index of this token in its parent token
func (*VariableItem) InternalGet ¶
func (v *VariableItem) InternalGet() token.Token
InternalGet returns the current referenced internal token
func (*VariableItem) InternalLogicalRemove ¶
func (v *VariableItem) 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 (*VariableItem) InternalReplace ¶
func (v *VariableItem) 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 (*VariableItem) Parse ¶
func (v *VariableItem) 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 (*VariableItem) Permutation ¶
func (v *VariableItem) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*VariableItem) Permutations ¶
func (v *VariableItem) Permutations() uint
Permutations returns the number of permutations for this token
func (*VariableItem) PermutationsAll ¶
func (v *VariableItem) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*VariableItem) SetScope ¶
func (v *VariableItem) SetScope(variableScope *token.VariableScope)
SetScope sets the scope of the token
func (*VariableItem) String ¶
func (v *VariableItem) String() string
type VariableReference ¶
type VariableReference struct {
// contains filtered or unexported fields
}
VariableReference implements a token which references a Variable token to output its referenced token
func NewVariableReference ¶
func NewVariableReference(variable token.VariableToken) *VariableReference
NewVariableReference returns a new instance of a VariableReference token
func (*VariableReference) Clone ¶
func (v *VariableReference) Clone() token.Token
Clone returns a copy of the token and all its children
func (*VariableReference) Follow ¶
func (v *VariableReference) Follow() bool
Follow returns if the children of the token should be traversed
func (*VariableReference) Index ¶
func (v *VariableReference) Index() int
Index returns the index of this token in its parent token
func (*VariableReference) Parse ¶
func (v *VariableReference) 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 (*VariableReference) Permutation ¶
func (v *VariableReference) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*VariableReference) Permutations ¶
func (v *VariableReference) Permutations() uint
Permutations returns the number of permutations for this token
func (*VariableReference) PermutationsAll ¶
func (v *VariableReference) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*VariableReference) Reference ¶
func (v *VariableReference) Reference() token.Token
Reference returns the referenced token
func (*VariableReference) SetScope ¶
func (v *VariableReference) SetScope(variableScope *token.VariableScope)
SetScope sets the scope of the token
func (*VariableReference) String ¶
func (v *VariableReference) String() string
type VariableSave ¶
type VariableSave struct {
Variable
}
VariableSave is based on the general Variable token but does prevent the output of the referenced token
func NewVariableSave ¶
func NewVariableSave(name string, token token.Token) *VariableSave
NewVariableSave returns a new instance of a VariableSave token
func (*VariableSave) Clone ¶
func (v *VariableSave) Clone() token.Token
Clone returns a copy of the token and all its children
func (*VariableSave) String ¶
func (v *VariableSave) String() string
type VariableValue ¶
type VariableValue struct {
// contains filtered or unexported fields
}
VariableValue implements a token which references a Variable token to output its referenced token
func NewVariableValue ¶
func NewVariableValue(variable token.VariableToken) *VariableValue
NewVariableValue returns a new instance of a VariableValue token
func (*VariableValue) Clone ¶
func (v *VariableValue) Clone() token.Token
Clone returns a copy of the token and all its children
func (*VariableValue) Get ¶
func (v *VariableValue) Get() token.Token
Get returns the current referenced token
func (*VariableValue) Index ¶
func (v *VariableValue) Index() int
Index returns the index of this token in its parent token
func (*VariableValue) InternalGet ¶
func (v *VariableValue) InternalGet() token.Token
InternalGet returns the current referenced internal token
func (*VariableValue) InternalLogicalRemove ¶
func (v *VariableValue) 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 (*VariableValue) InternalReplace ¶
func (v *VariableValue) 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 (*VariableValue) Parse ¶
func (v *VariableValue) 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 (*VariableValue) Permutation ¶
func (v *VariableValue) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*VariableValue) Permutations ¶
func (v *VariableValue) Permutations() uint
Permutations returns the number of permutations for this token
func (*VariableValue) PermutationsAll ¶
func (v *VariableValue) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*VariableValue) SetScope ¶
func (v *VariableValue) SetScope(variableScope *token.VariableScope)
SetScope sets the scope of the token
func (*VariableValue) String ¶
func (v *VariableValue) String() string