Skip to content

Commit 55ced38

Browse files
committed
Better
1 parent 9104ab4 commit 55ced38

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

packages/tinyest/src/nodes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export type AssignmentOperator =
160160
| '&='
161161
| '**='
162162
| '||='
163-
| '&&=';
163+
| '&&='
164+
| '>>>='
165+
| '??=';
164166

165167
export type AssignmentExpression = readonly [
166168
type: NodeTypeCatalog['assignmentExpr'],

packages/typegpu/src/tgsl/generationHelpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ export function accessProp(
230230
}
231231

232232
if (isVec(target.dataType)) {
233+
// Example: d.vec3f().kind === 'vec3f'
233234
if (propName === 'kind') {
234235
return snip(target.dataType.type, UnknownData, 'constant');
235236
}

packages/typegpu/src/tgsl/wgslGenerator.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,18 @@ const OP_MAP = {
111111
get '??'(): never {
112112
throw new Error('The `??` operator is unsupported in TypeGPU functions.');
113113
},
114+
//
115+
// assignment
116+
//
117+
get '>>>='(): never {
118+
throw new Error('The `>>>=` operator is unsupported in TypeGPU functions.');
119+
},
120+
get '**='(): never {
121+
throw new Error('The `**=` operator is unsupported in TypeGPU functions.');
122+
},
123+
get '??='(): never {
124+
throw new Error('The `??=` operator is unsupported in TypeGPU functions.');
125+
},
114126
} as Record<string, string>;
115127

116128
type Operator =

0 commit comments

Comments
 (0)