🔰declaration
🚧 施工中
defines new variables or types.
GRAMMAR OF A DECLARATION
declaration → import-declaration
declaration → constant-declaration
declaration → variable-declaration
declaration → typealias-declaration
declaration → function-declaration
declaration → enum-declaration
declaration → struct-declaration
declaration → class-declaration
declaration → actor-declaration
declaration → protocol-declaration
declaration → initializer-declaration
declaration → deinitializer-declaration
declaration → extension-declaration
declaration → subscript-declaration
declaration → operator-declaration
declaration → precedence-group-declaration
declarations → declaration declarations opt
In Swift, most declarations are also definitions in the sense that they’re implemented or initialized at the same time they’re declared, .... the distinction isn’t that important in Swift, the term declaration covers both declarations and definitions.
declaration is a simple statement.
Last updated