codegen

package
v0.15.10 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 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

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

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

func (*EmbedPageGenerator) WritePage16

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

func (*EmbedPageGenerator) WriteToFile

func (pg *EmbedPageGenerator) WriteToFile(out string)

func (*EmbedPageGenerator) WriteTrailer

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

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

func (*LiteralPageGenerator) WritePage16

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