enumtype¶
How the values of an enumeration are distributed.
Declaration¶
Syntax¶
enumtype
= IntegerConsecutiveFromZero
| IntegerUnique
| IntegerNotUnique
| NonInteger
Values¶
Value |
Meaning |
|---|---|
|
the values are 0, 1, 2, … in order. A backend may use one directly as an index. |
|
integer values, all different, but not consecutive. |
|
integer values, with repeats. |
|
the values are not integers, so arithmetic on them is not meaningful. |
Return values¶
None. An enumeration value is not evaluated.
Description¶
The frontend works this out once, when it builds the Enum, so that a later pass can tell whether a jump table is possible without examining every enumerator.