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: FunctionDeclSyntax)
Properties
attributes
The declaration attributes.
letattributes: [Attribute]
modifiers
The declaration modifiers.
letmodifiers: [Modifier]
keyword
The declaration keyword ("func").
letkeyword: String
identifier
The function identifier.
letidentifier: String
signature
The function signature.
letsignature: Signature
genericParameters
The generic parameters for the declaration.
letgenericParameters: [GenericParameter]
For example,
the following declaration of function f
has a single generic parameter
whose identifier is "T" and type is "Equatable":
func f<T: Equatable>(value: T){}
genericRequirements
The generic parameter requirements for the declaration.
letgenericRequirements: [GenericRequirement]
For example,
the following declaration of function f
has a single requirement
that its generic parameter identified as "T"
conforms to the type identified as "Hahable":