Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Modifier

mattt edited this page Jan 22, 2020 · 6 revisions

Modifier

A declaration modifier.

public struct Modifier: Hashable, Codable

A declaration may have one or more modifiers to specify access control (private / public / etc.), declare a type member (class / static), or designate its mutability (nonmutating). A declaration modifier may specify an additional detail within enclosing parentheses (()) following its name.

For example, the following property declaration has two modifiers:

public private(set) var title: String

Inheritance

Hashable, Codable, CustomStringConvertible, ExpressibleBySyntax


Initializers

init(_:)

Creates an instance initialized with the given syntax node.

public init(_ node: DeclModifierSyntax)

Properties

name

The declaration modifier name.

let name: String

detail

The modifier detail, if any.

let detail: String?

description

var description: String
Clone this wiki locally