Documentation
¶
Overview ¶
Package printer outputs WGSL code from an AST.
The printer can operate in two modes: - Pretty: Human-readable output with indentation - Minified: Minimal whitespace output
Following the esbuild pattern, minification decisions are made during printing rather than as a separate AST transformation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// MinifyWhitespace removes unnecessary whitespace
MinifyWhitespace bool
// MinifyIdentifiers uses short names for identifiers
MinifyIdentifiers bool
// MinifySyntax applies syntax-level optimizations
MinifySyntax bool
// TreeShaking enables dead code elimination (skip dead declarations)
TreeShaking bool
// Renamer provides minified names (nil for no renaming)
Renamer Renamer
// SourceMapGen is the source map generator (nil to disable)
SourceMapGen *sourcemap.Generator
}
Options controls printer output.
Click to show internal directories.
Click to hide internal directories.