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:
Attributesandimport-kindare optional.import-kindrefers to the type of the import (class, struct, enum etc etc).... defined in the second line. Doesattributesrefers to@availablewhich can used to add an import for a specific platform version?- In the 3rd line, I understand that
identifierhere refers to the names of modules, classes, funcs etc., but what doesimport-pathmean? Can I give the actual path in disk? What all comes under this? I couldn't understand from this documentation.