Variable
public struct Variable : Declaration, Hashable, Codable
extension Variable: ExpressibleBySyntax
extension Variable: CustomStringConvertible
A declaration for a property or a top-level variable or constant.
-
Undocumented
Declaration
Swift
public let context: String?
-
The declaration attributes.
Declaration
Swift
public let attributes: [Attribute]
-
The declaration modifiers.
Declaration
Swift
public let modifiers: [Modifier]
-
The declaration keyword (
"let"
or"var"
).Declaration
Swift
public let keyword: String
-
The name of the property or top-level variable or constant.
Declaration
Swift
public let name: String
-
The type annotation for the declaration, if any.
Declaration
Swift
public let typeAnnotation: String?
-
The initialized value for the declaration, if any.
Declaration
Swift
public let initializedValue: String?
-
The variable or property accessors.
Declaration
Swift
public let accessors: [Accessor]
-
A computed variable or computed property accessor.
See moreDeclaration
-
Undocumented
Declaration
Swift
public static func variables(from node: VariableDeclSyntax) -> [Variable]
-
Creates an instance initialized with the given syntax node.
Declaration
Swift
@available(swift, introduced: 0.0.1, deprecated: 0.0.1, message: "Use Variable.variables(from:﹚ instead") public init(_ node: VariableDeclSyntax)
-
Declaration
Swift
public var description: String { get }