codegen

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

func NewGenerator

func NewGenerator(seed int64) *Generator

func (*Generator) AddPackageImport

func (g *Generator) AddPackageImport(packageName string)

func (*Generator) AddPackageImportWithAlias

func (g *Generator) AddPackageImportWithAlias(packageName string, importAlias string)

func (*Generator) GenerateFunction

func (g *Generator) GenerateFunction(fs *parse.FileSet, funcDecl *ast.FuncDeclNode, nodeTypes map[*ast.SubstitutionNode]types.Type) error

func (*Generator) GenerateRawCode

func (g *Generator) GenerateRawCode(rawCodeNode *ast.RawCodeNode) error

func (*Generator) GenerateTypecheckingFunction

func (g *Generator) GenerateTypecheckingFunction(funcDecl *ast.FuncDeclNode) (map[string]*ast.SubstitutionNode, error)

func (*Generator) Render

func (g *Generator) Render(packageName string) ([]byte, error)

Jump to

Keyboard shortcuts

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