SwiftSemantics Documentation Beta

Structure Variable.​Accessor

public struct Accessor: Hashable, Codable

A computed variable or computed property accessor.

%3 Variable.Accessor Variable.Accessor Codable Codable Variable.Accessor->Codable Hashable Hashable Variable.Accessor->Hashable ExpressibleBySyntax ExpressibleBySyntax Variable.Accessor->ExpressibleBySyntax

Member Of

Variable

A declaration for a property or a top-level variable or constant.

Nested Types

Variable.Accessor.Kind

The kind of accessor (get or set).

Conforms To

ExpressibleBySyntax

A type that can be initialized with a Swift syntax node.

Codable
Hashable

Initializers

init?(_:​)

public init?(_ node: AccessorDeclSyntax)

Properties

attributes

let attributes: [Attribute]

The accessor attributes.

modifier

let modifier: Modifier?

The accessor modifiers.

kind

let kind: Kind?

The kind of accessor.

Methods

accessors(from:​)

public static func accessors(from node: AccessorBlockSyntax?) -> [Variable.Accessor]