emitgo

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package emitgo emits Go source code from Statement IR.

This is the ONLY package that knows about Go syntax. It reads stmt.Program and produces Go source code. It does not import internal/core or internal/ast.

The emitter is intentionally simple — ~400 LOC vs the old codegen's ~10K LOC. All complexity lives in the lowering passes (internal/gen/lower/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(prog *stmt.Program) ([]byte, error)

Emit produces Go source code from a Statement IR Program.

func EmitFuncs

func EmitFuncs(prog *stmt.Program, moduleName string) ([]byte, error)

EmitFuncs produces just the function declarations as a separate file.

func EmitTypes

func EmitTypes(prog *stmt.Program) ([]byte, error)

EmitTypes produces just the type declarations as a separate file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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