Documentation
¶
Index ¶
- type BasicCodeCreator
- func (bcc *BasicCodeCreator[T]) Block(prefix string, block func(cc *BasicCodeCreator[T]), suffix string)
- func (bcc *BasicCodeCreator[T]) Comment(lines string)
- func (bcc *BasicCodeCreator[T]) Comments(lines ...string)
- func (bcc *BasicCodeCreator[T]) For(initState, condition, iterationStep string, ...)
- func (bcc *BasicCodeCreator[T]) ForIndexed(indexVar, startValue, upperBound, step string, ...)
- func (bcc *BasicCodeCreator[T]) If(condition string, block func(cc *BasicCodeCreator[T]))
- func (bcc *BasicCodeCreator[T]) IfElse(condition string, block func(cc *BasicCodeCreator[T]), ...)
- func (bcc *BasicCodeCreator[T]) NewVariable(name string) string
- type CodeCreator
- type CppCodeCreator
- type CppHelper
- type LanguageBundle
- type PhpCodeCreator
- type PhpHelder
- func (ph PhpHelder) AddAssign(name, value string) string
- func (ph PhpHelder) Assign(name, value string) string
- func (ph PhpHelder) CheckBit(target string, bit int) string
- func (ph PhpHelder) Equal(left, right string) string
- func (ph PhpHelder) NotEqual(left, right string) string
- func (ph PhpHelder) OrAssign(name, value string) string
- func (ph PhpHelder) SubAssign(name, value string) string
- func (ph PhpHelder) TL2CountBytes(value string) string
- func (ph PhpHelder) TL2FetchSize() string
- func (ph PhpHelder) TL2FetchSizeTo(name string) string
- func (ph PhpHelder) TL2SkipBytes(value string) string
- func (ph PhpHelder) TL2StoreSize(value string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicCodeCreator ¶
type BasicCodeCreator[T any] struct { CodeCreator LanguageBundle Lang T // contains filtered or unexported fields }
func (*BasicCodeCreator[T]) Block ¶
func (bcc *BasicCodeCreator[T]) Block(prefix string, block func(cc *BasicCodeCreator[T]), suffix string)
func (*BasicCodeCreator[T]) Comment ¶
func (bcc *BasicCodeCreator[T]) Comment(lines string)
func (*BasicCodeCreator[T]) Comments ¶
func (bcc *BasicCodeCreator[T]) Comments(lines ...string)
func (*BasicCodeCreator[T]) For ¶
func (bcc *BasicCodeCreator[T]) For(initState, condition, iterationStep string, block func(cc *BasicCodeCreator[T]))
func (*BasicCodeCreator[T]) ForIndexed ¶
func (bcc *BasicCodeCreator[T]) ForIndexed(indexVar, startValue, upperBound, step string, block func(cc *BasicCodeCreator[T]))
func (*BasicCodeCreator[T]) If ¶
func (bcc *BasicCodeCreator[T]) If(condition string, block func(cc *BasicCodeCreator[T]))
func (*BasicCodeCreator[T]) IfElse ¶
func (bcc *BasicCodeCreator[T]) IfElse(condition string, block func(cc *BasicCodeCreator[T]), elseBlock func(cc *BasicCodeCreator[T]))
func (*BasicCodeCreator[T]) NewVariable ¶
func (bcc *BasicCodeCreator[T]) NewVariable(name string) string
type CodeCreator ¶
type CodeCreator struct {
Shift string
// contains filtered or unexported fields
}
func (*CodeCreator) AddBlock ¶
func (cc *CodeCreator) AddBlock(block func(cc *CodeCreator))
func (*CodeCreator) AddLines ¶
func (cc *CodeCreator) AddLines(lines ...string)
func (*CodeCreator) AddShift ¶
func (cc *CodeCreator) AddShift(shift int)
func (*CodeCreator) Print ¶
func (cc *CodeCreator) Print() []string
type CppCodeCreator ¶
type CppCodeCreator = BasicCodeCreator[CppHelper]
func NewCppCodeCreator ¶
func NewCppCodeCreator() CppCodeCreator
type LanguageBundle ¶
type LanguageBundle struct {
// contains filtered or unexported fields
}
type PhpCodeCreator ¶
type PhpCodeCreator = BasicCodeCreator[PhpHelder]
func NewPhpCodeCreator ¶
func NewPhpCodeCreator() PhpCodeCreator
type PhpHelder ¶
type PhpHelder struct{}
func (PhpHelder) TL2CountBytes ¶
func (PhpHelder) TL2FetchSize ¶
func (PhpHelder) TL2FetchSizeTo ¶
func (PhpHelder) TL2SkipBytes ¶
func (PhpHelder) TL2StoreSize ¶
Click to show internal directories.
Click to hide internal directories.