codegen

package
v0.3.41 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 9 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
}

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.

Directories

Path Synopsis
Package effectplan performs whole-project call-graph analysis for backend effects that remain intentionally absent from TypeRB source signatures.
Package effectplan performs whole-project call-graph analysis for backend effects that remain intentionally absent from TypeRB source signatures.
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