emitExpr
On this page

emitExpr()

Function in Emit

Emit one Expr as WGSL source text, using wgslBackend with the default 'full' parenthesisation.

import { emitExpr } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const emitExpr: (e: Expr) => string

Parameters

e Expr

Return value

string

Description

The expression is written as given; the lowering and optimization passes that emitModule runs do not run here.

Targets

TargetSupportNotes
WGSL (WebGPU) Supported

Writes WGSL for WebGPU.

GLSL ES 3.00 (WebGL2) Does not apply
CPU oracle Does not apply

See also

Source

src/core/backends/wgsl.ts, line 487, at commit 26de7be8

Edit this page Report a problem