Documentation ¶
Overview ¶
Package token provides a tool to convert a string to Tokens that represent GO code.
Index ¶
Constants ¶
View Source
const (
Delimiter = "%"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chunker ¶
type Chunker struct { }
func NewChunker ¶
func NewChunker() *Chunker
type FactoryFunction ¶
type FactoryFunction struct {
// contains filtered or unexported fields
}
FactoryFunction handles %env(ENV_VAR)%.
func NewFactoryFunction ¶
func NewFactoryFunction( a aliaser, fn string, goImport string, goFn string, ) *FactoryFunction
func (*FactoryFunction) Supports ¶
func (f *FactoryFunction) Supports(expr string) bool
type FactoryPercentMark ¶
type FactoryPercentMark struct{}
FactoryPercentMark handles %%.
func (FactoryPercentMark) Supports ¶
func (f FactoryPercentMark) Supports(expr string) bool
type FactoryReference ¶
type FactoryReference struct{}
FactoryReference handles %my.param%.
func (FactoryReference) Supports ¶
func (FactoryReference) Supports(s string) bool
type FactoryString ¶
type FactoryString struct{}
func (FactoryString) Supports ¶
func (FactoryString) Supports(string) bool
type FactoryUnexpectedFunction ¶
type FactoryUnexpectedFunction struct { }
func (FactoryUnexpectedFunction) Create ¶
func (FactoryUnexpectedFunction) Create(expr string) (t Token, _ error)
func (FactoryUnexpectedFunction) Supports ¶
func (FactoryUnexpectedFunction) Supports(expr string) bool
type FactoryUnexpectedToken ¶
type FactoryUnexpectedToken struct { }
func (FactoryUnexpectedToken) Create ¶
func (f FactoryUnexpectedToken) Create(expr string) (t Token, _ error)
func (FactoryUnexpectedToken) Supports ¶
func (FactoryUnexpectedToken) Supports(expr string) bool
type FuncRegisterer ¶
type FuncRegisterer struct {
// contains filtered or unexported fields
}
func NewFuncRegisterer ¶
func NewFuncRegisterer( p interface{ Prepend(s tokenFactoryStrategy) }, a aliaser, ) *FuncRegisterer
func (*FuncRegisterer) RegisterFunc ¶
func (f *FuncRegisterer) RegisterFunc(fnAlias string, goImport string, goFn string)
type StrategyFactory ¶
type StrategyFactory struct {
// contains filtered or unexported fields
}
func NewStrategyFactory ¶
func NewStrategyFactory(strategies ...tokenFactoryStrategy) *StrategyFactory
func (*StrategyFactory) Prepend ¶
func (f *StrategyFactory) Prepend(s tokenFactoryStrategy)
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
func NewTokenizer ¶
func NewTokenizer(ch chunker, f factory) *Tokenizer
Click to show internal directories.
Click to hide internal directories.