codegen

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extension

func Extension(mode string) string

func GeneratedSourceDirectory added in v0.3.33

func GeneratedSourceDirectory(mode, directory string) string

GeneratedSourceDirectory returns the backend directory that owns generated files for a TypeRB source directory.

func ValidateProject added in v0.2.31

func ValidateProject(programs []*ir.Program) error

ValidateProject performs backend-owned project validation without emitting target source. Backends without generation-time validation return directly; TypeScript receives the same normalized lowered IR as GenerateProject.

Types

type Generated added in v0.2.4

type Generated struct {
	Output             []byte
	SourceMap          sourcemap.Map
	SupportFiles       []SupportFile
	NativeDependencies map[string]string
}

func Generate

func Generate(program *ir.Program) (Generated, error)

func GenerateProject added in v0.2.0

func GenerateProject(programs []*ir.Program) ([]Generated, error)

GenerateProject emits a set of already-lowered modules in project order. Keeping the project boundary here lets a backend perform whole-project analysis without leaking backend-specific concerns into parsing, checking, or the shared IR.

type SupportFile added in v0.4.4

type SupportFile struct {
	Path   string
	Output []byte
}

SupportFile is a compiler-owned target source, not a portable source module and not a provider artifact. Path is relative to the generated project root.

Directories

Path Synopsis
Package effectplan performs whole-project call-graph analysis shared by backend effect planning and mode-independent scoped-resource validation.
Package effectplan performs whole-project call-graph analysis shared by backend effect planning and mode-independent scoped-resource validation.
Package naming contains target-independent helpers for encoding TypeRB source names that are not valid identifiers in every backend.
Package naming contains target-independent helpers for encoding TypeRB source names that are not valid identifiers in every backend.

Jump to

Keyboard shortcuts

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