codegen

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteFastPage32 added in v0.14.0

func WriteFastPage32(g *Generator, varname string, values []uint32)

Types

type Array16

type Array16 []uint16

type Array32

type Array32 []uint32

type Array8

type Array8 []byte

type EmbedPageGenerator added in v0.14.0

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

func (*EmbedPageGenerator) WritePage16 added in v0.14.0

func (pg *EmbedPageGenerator) WritePage16(g *Generator, varname string, values []uint16) string

func (*EmbedPageGenerator) WriteToFile added in v0.14.0

func (pg *EmbedPageGenerator) WriteToFile(out string)

func (*EmbedPageGenerator) WriteTrailer added in v0.14.0

func (pg *EmbedPageGenerator) WriteTrailer(g *Generator, embedfile string)

type Generator

type Generator struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func Merge

func Merge(gens ...*Generator) *Generator

func NewGenerator

func NewGenerator(pkg Package) *Generator

func (*Generator) Fail

func (g *Generator) Fail(err string)

func (*Generator) P

func (g *Generator) P(str ...any)

func (*Generator) UsePackage

func (g *Generator) UsePackage(pkg Package)

func (*Generator) WriteToFile

func (g *Generator) WriteToFile(out string)

type LiteralPageGenerator added in v0.14.0

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

func (*LiteralPageGenerator) WritePage16 added in v0.14.0

func (pg *LiteralPageGenerator) WritePage16(g *Generator, varname string, values []uint16) string

type Package

type Package string

func (Package) Name

func (pkg Package) Name() string

type PageGenerator

type PageGenerator interface {
	WritePage16(g *Generator, varname string, values []uint16) string
}

func NewPageGenerator

func NewPageGenerator(embed bool) PageGenerator

type Quote

type Quote string

type TableGenerator

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

func NewTableGenerator

func NewTableGenerator(ucav string, pagebuilder PageGenerator) *TableGenerator

func (*TableGenerator) Add

func (tg *TableGenerator) Add(codepoint rune, weights []uint16)

func (*TableGenerator) Add900

func (tg *TableGenerator) Add900(codepoint rune, rhs [][3]uint16)

func (*TableGenerator) AddFromAllkeys

func (tg *TableGenerator) AddFromAllkeys(lhs []rune, rhs [][]int, vars []int)

func (*TableGenerator) WriteFastTables

func (tg *TableGenerator) WriteFastTables(g *Generator, layout uca.Layout)

func (*TableGenerator) WriteTables

func (tg *TableGenerator) WriteTables(g *Generator, layout uca.Layout)

Jump to

Keyboard shortcuts

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