According to swift documentation, the following describes the various forms of the Import
declaration.
Grammar of an import declaration
import-declaration → attributes? import import-kind? import-path
import-kind → typealias | struct | class | enum | protocol | let | var | func
import-path → identifier | identifier . import-path
Questions:
Attributes
andimport-kind
are optional.import-kind
refers to the type of the import (class, struct, enum etc etc).... defined in the second line. Doesattributes
refers to@available
which can used to add an import for a specific platform version?- In the 3rd line, I understand that
identifier
here refers to the names of modules, classes, funcs etc., but what doesimport-path
mean? Can I give the actual path in disk? What all comes under this? I couldn't understand from this documentation.