You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 17, 2021. It is now read-only.
Creates an instance initialized with the given syntax node.
publicinit(_ node: EnumDeclSyntax)
Properties
attributes
The enumeration declaration attributes.
letattributes: [Attribute]
modifiers
The enumeration declaration modifiers.
letmodifiers: [Modifier]
keyword
The enumeration declaration keyword (enum).
letkeyword: String
name
The name of the enumeration.
letname: String
inheritance
A list of inherited type names.
letinheritance: [String]
If the enumeration is raw representable,
the first element is the raw value type.
Any other elements are names of protocols.
For example,
given the following declarations,
the inheritance of enumeration E is ["Int", "P"]:
protocolP{}enumE: Int, P {}
genericParameters
The generic parameters for the declaration.
letgenericParameters: [GenericParameter]
For example,
the following declaration of enumeration E
has a single generic parameter
whose name is "T" and type is "Equatable":
enumE<T: Equatable>{}
genericRequirements
The generic parameter requirements for the declaration.
letgenericRequirements: [GenericRequirement]
For example,
the following declaration of enumeration E
has a single requirement
that its generic parameter identified as "T"
conforms to the type identified as "Hahable":