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: StructDeclSyntax)
Properties
attributes
The declaration attributes.
letattributes: [Attribute]
modifiers
The declaration modifiers.
letmodifiers: [Modifier]
keyword
The declaration keyword ("struct").
letkeyword: String
name
The structure name.
letname: String
inheritance
A list of adopted protocols.
letinheritance: [String]
For example,
given the following declarations,
the inheritance of structure S is ["P", "Q"]:
protocolP{}protocolQ{}structS{}
genericParameters
The generic parameters for the declaration.
letgenericParameters: [GenericParameter]
For example,
the following declaration of structure S
has a single generic parameter
whose name is "T" and type is "Equatable":
structS<T: Equatable>{}
genericRequirements
The generic parameter requirements for the declaration.
letgenericRequirements: [GenericRequirement]
For example,
the following declaration of structure S
has a single requirement
that its generic parameter identified as "T"
conforms to the type identified as "Hahable":