RawStmt
타입, IR 분류
The raw statement node: a fragment of target source spliced verbatim into a function body, spelled per target.
import type { RawStmt } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
type RawStmt = Extract<Stmt, { s: 'raw' }>;설명
The raw statement node: a fragment of target source spliced verbatim into a
function body, spelled per target. It carries a wgsl side, a glsl side, or both,
and at least one is required. A Backend receives the whole node in its
rawStmt method and emits its own side; when that side is absent it throws SD0030,
so a one-sided raw statement means “this module does not build for that target” and
never emits the wrong text. The CPU backend throws on every raw statement, since raw
text has no CPU evaluation. Build one with rawStmt.
함께 보기
소스
src/core/ir/nodes.ts, 357행, 커밋 c66579bf 기준