codecreator

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

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 CppHelper

type CppHelper struct{}

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) AddAssign

func (ph PhpHelder) AddAssign(name, value string) string

func (PhpHelder) Assign

func (ph PhpHelder) Assign(name, value string) string

func (PhpHelder) CheckBit

func (ph PhpHelder) CheckBit(target string, bit int) string

func (PhpHelder) Equal

func (ph PhpHelder) Equal(left, right string) string

func (PhpHelder) NotEqual

func (ph PhpHelder) NotEqual(left, right string) string

func (PhpHelder) OrAssign

func (ph PhpHelder) OrAssign(name, value string) string

func (PhpHelder) SubAssign

func (ph PhpHelder) SubAssign(name, value string) string

func (PhpHelder) TL2CountBytes

func (ph PhpHelder) TL2CountBytes(value string) string

func (PhpHelder) TL2FetchSize

func (ph PhpHelder) TL2FetchSize() string

func (PhpHelder) TL2FetchSizeTo

func (ph PhpHelder) TL2FetchSizeTo(name string) string

func (PhpHelder) TL2SkipBytes

func (ph PhpHelder) TL2SkipBytes(value string) string

func (PhpHelder) TL2StoreSize

func (ph PhpHelder) TL2StoreSize(value string) string

Jump to

Keyboard shortcuts

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