Rule 3.5
On this page

Rule 3.5

Chapter 3, Textual structure and names Test

A name the compiler generates (the mangler, the type aliaser) must not be a keyword or reserved word of either target.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

Rationale

a generated as is a program the author never wrote and cannot fix.

Derives from

the same two WGSL sections; WGSL_RESERVED and GLSL_ES300_RESERVED in src/core/reserved-words.ts, from which RESERVED_WORDS, the list a generated name is checked against, is built.

How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

examples/reserved-word-safety.test.ts, asserted on the rename maps.

The files that verify it at commit 26de7be8, each at the first line that names the rule:

See also

Source

The rule at commit 26de7be8:

Edit this page Report a problem