import { Tree } from '@lezer/common'; import { ParsedModule, ShaderDefine } from './types.d.cts'; import LRU from 'lru-cache'; export { loadStaticModule, loadVirtualModule, bindEntryPoint } from '../util/shader.d.cts'; /** LRU cache for parsed shader code */ export declare const makeModuleCache: (options?: Record) => LRU; export declare const DEFAULT_CACHE: LRU; /** Parse GLSL code into lezer tree */ export declare const parseShader: (code: string) => Tree; /** Parse a code module into its in-memory representation (AST + symbol table) */ export declare const loadModule: (code: string, name?: string, entry?: string, compressed?: boolean) => import("...d.cts").ParsedModule; /** Use cache to load modules */ export declare const loadModuleWithCache: (code: string, name?: string, entry?: string, cache?: import("...d.cts").ParsedModuleCache | null) => import("...d.cts").ParsedModule; /** Make GLSL definitions */ export declare const defineConstants: (defs: Record) => string; /** Make GLSL enable definitions */ export declare const defineEnables: (enabled: string[]) => string; /** Convert a bundle with a defined entry point to a definition for that attribute or type. */ export declare const bundleToAttribute: (shader: import("...d.cts").ShaderModule, name?: string) => import("...d.cts").UniformAttribute; /** Convert a bundle to a definition for all its linkable attributes. */ export declare const bundleToAttributes: (shader: import("...d.cts").ShaderModule) => import("...d.cts").UniformAttribute[]; /** Convert a bundle to a definition for all its bindings. */ export declare const bundleToBindings: (shader: import("...d.cts").ShaderModule) => import("...d.cts").UniformAttribute[]; /** Convert an attribute to all its primitive fields. */ export declare const attributeToFields: (attribute: import("...d.cts").UniformAttribute) => import("...d.cts").UniformAttribute; export declare const symbolDictionary: { A: "at"; B: "bindings"; E: "exports"; F: "func"; G: "flags"; H: "inferred"; I: "identifiers"; J: "imported"; K: "imports"; L: "linkable"; M: "members"; N: "name"; O: "modules"; P: "parameters"; Q: "qual"; R: "symbol"; S: "symbols"; T: "type"; U: "struct"; V: "variable"; W: "visibles"; X: "externals"; Y: "types"; Z: "attr"; }; /** ES/CommonJS Transpiler */ export declare const transpileGLSL: (source: string, resourcePath: string, options?: import("...d.cts").TranspileOptions) => import("...d.cts").TranspileOutput; /** Templated literal syntax: ```tsx glsl`...` ``` */ export declare const glsl: (literals: TemplateStringsArray, ...tokens: string[]) => import("...d.cts").ParsedModule; /** Format `number` as GLSL `float` */ export declare const float: (x: number) => string | 0; /** Format `number` as GLSL `uint` */ export declare const uint: (x: number) => string; /** Format `number` as GLSL `int` */ export declare const int: (x: number) => string;