Enumeration Declarations
Enumerations are named global declarations, subject to the behavior described here.
Resultant Symbol
References to enumeration declarations resolve to the declared enumeration type value, with the declared variants.
Assertions
- Each variant's payload type expression is a value of the type type.
- Each variant's payload type is runtime representable.
- Each variant's name is unique within the enumeration.
Syntax
enumeration_declaration_variant = identifier, [ colon, expression ], semicolon ;
enumeration_declaration = enum, identifier, left_brace, { enumeration_declaration_variant }, right_brace ;