Help us shape the future of Go! Take the 2026 Go Developer Survey

compile

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package compile checks a parsed writ file for well-formedness and lowers it to the IL. Checking covers SPEC §7's compile-time rules; the apply-time rules (unknown requirement/flag/notify names, past until timestamps, inventory-aware lints) belong to whoever owns the registries and inventory, not to the language.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(file *ast.File) []diag.Diagnostic

Check runs the compile-time static checks on a parsed file: macro resolution (define-before-use, redefinition, kind mismatch), duplicate clauses, duplicate selector keys, and the unused-macro and duplicate-list-entry lints.

func Compile

func Compile(file *ast.File) (*il.Policy, []diag.Diagnostic)

Compile checks file and lowers it to a policy. The policy is non-nil iff no error-severity diagnostics were produced; warnings never block.

Types

This section is empty.

Jump to

Keyboard shortcuts

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