SwiftSemantics Documentation Beta

Structure Import

public struct Import: Declaration, Hashable, Codable

An import declaration.

%3 Import Import Declaration Declaration Import->Declaration CustomStringConvertible CustomStringConvertible Import->CustomStringConvertible Codable Codable Import->Codable Hashable Hashable Import->Hashable ExpressibleBySyntax ExpressibleBySyntax Import->ExpressibleBySyntax

Conforms To

Declaration

A Swift declaration.

ExpressibleBySyntax

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

Codable
CustomStringConvertible
Hashable

Initializers

init(_:​)

public init(_ node: ImportDeclSyntax)

Creates an instance initialized with the given syntax node.

Properties

attributes

let attributes: [Attribute]

The declaration attributes.

modifiers

let modifiers: [Modifier]

The declaration modifiers.

keyword

let keyword: String

The import keyword ("import").

kind

let kind: String?

path​Components

let pathComponents: [String]

description

var description: String