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

Enumeration_Case

Mattt edited this page Aug 2, 2020 · 6 revisions

Enumeration.Case

An enumeration case.

public struct Case:​ Declaration, Hashable, Codable

Inheritance

Codable, CustomStringConvertible, Declaration, Hashable

Initializers

init?(_:​)

Creates an instance initialized with the given syntax node.

public init?(_ node:​ EnumCaseElementSyntax)

Properties

attributes

The declaration attributes.

let attributes:[Attribute]

modifiers

The declaration modifiers.

let modifiers:[Modifier]

keyword

The declaration keyword ("case").

let keyword:​ String

name

The enumeration case name.

let name:​ String

associatedValue

The associated values of the enumeration case, if any.

let associatedValue:[Function.Parameter]?

rawValue

The raw value of the enumeration case, if any.

let rawValue:​ String?

description

var description:​ String

Methods

cases(from:​)

Creates and returns enumeration cases from an enumeration case declaration.

public static func cases(from node:​ EnumCaseDeclSyntax) -> [Enumeration.Case]
Clone this wiki locally