DeclShape

enum DeclShape

The grammatical shape a viewed declaration parsed as. Functions, methods, and initializers report a body; every shape reports a name when the grammar declares one.

Cases

case func_shape

A function or method declaration with a body.

case init_shape

An initializer declaration with a body.

case struct_shape

A struct declaration.

case enum_shape

An enum declaration.

case protocol_shape

A protocol declaration.

case extend_shape

An extension declaration.

case let_shape

A local or top-level let declaration.

case property_shape

A stored-property declaration.

case variant_shape

An enum variant declaration.

case typealias_shape

A type-alias declaration.

case effect_shape

An effect declaration.

case import_shape

An import declaration.

case signature_shape

A bodyless function, method, or initializer requirement.

case associated_shape

An associated-type declaration.

case other_shape

A macro-related or otherwise unsupported declaration shape.