UNPKG

wgsl-plus

Version:

A WGSL preprocessor, prettifier, minifier, obfuscator, and compiler with C-style macros, conditional compilation, file linking, and multi-format output for WebGPU shaders.

16 lines (15 loc) 448 B
/** * Type definition for a macro */ export type Macro = { value: string; params?: string[]; // For function-like macros }; /** * Type for tracking conditional inclusion state */ export type ConditionalState = { including: boolean; // Are we currently including code? hasBeenTrue: boolean; // Has any branch in this if-chain been true? hasElse: boolean; // Has an #else directive been seen for this conditional? };