dmd.attrib

Defines declarations of various attributes.

The term 'attribute' refers to things that can apply to a larger scope than a single declaration. Among them are: - Alignment (align(8)) - User defined attributes (@UDA) - Function Attributes (@safe) - Storage classes (static, __gshared) - Mixin declarations (mixin("int x;")) - Conditional compilation (static if, static foreach) - Linkage (extern(C)) - Anonymous structs / unions - Protection (private, public) - Deprecated declarations (@deprecated)

Members

Classes

AlignDeclaration
class AlignDeclaration

Alignment attribute for aggregates, members and variables.

AnonDeclaration
class AnonDeclaration

An anonymous struct/union (defined by isunion).

AttribDeclaration
class AttribDeclaration

Abstract attribute applied to Dsymbol's used as a common ancestor for storage classes (StorageClassDeclaration), linkage (LinkageDeclaration) and others.

CPPMangleDeclaration
class CPPMangleDeclaration

Attribute declaring whether an external aggregate should be mangled as a struct or class in C++, e.g. extern(C++, struct) class C { ... }. This is required for correct name mangling on MSVC targets, see cppmanglewin.d for details.

CPPNamespaceDeclaration
class CPPNamespaceDeclaration

A node to represent an extern(C++) namespace attribute

CompileDeclaration
class CompileDeclaration

Mixin declarations, like: mixin("int x"); https://dlang.org/spec/module.html#mixin-declaration

ConditionalDeclaration
class ConditionalDeclaration

A conditional compilation declaration, used for version / debug and specialized for static if.

DeprecatedDeclaration
class DeprecatedDeclaration

Deprecation with an additional message applied to Dsymbols, e.g. deprecated("Superseeded by foo") int bar;. (Note that deprecated int bar; is currently represented as a StorageClassDeclaration with STC.deprecated_)

ForwardingAttribDeclaration
class ForwardingAttribDeclaration

Collection of declarations that stores foreach index variables in a local symbol table. Other symbols declared within are forwarded to another scope, like:

LinkDeclaration
class LinkDeclaration

Linkage attribute applied to Dsymbols, e.g. extern(C) void foo().

PragmaDeclaration
class PragmaDeclaration

Pragma applied to Dsymbols, e.g. pragma(inline, true) void foo, but not PragmaStatement's like pragma(msg, "hello");.

StaticForeachDeclaration
class StaticForeachDeclaration

Static foreach at declaration scope, like: static foreach (i; [0, 1, 2]){ }

StaticIfDeclaration
class StaticIfDeclaration

`<scopesym> { static if (<condition>) { <decl> } else { <elsedecl> } }`

StorageClassDeclaration
class StorageClassDeclaration

Storage classes applied to Dsymbols, e.g. const int i;

UserAttributeDeclaration
class UserAttributeDeclaration

User defined attributes look like: @foo(args, ...) @(args, ...)

VisibilityDeclaration
class VisibilityDeclaration

Visibility declaration for Dsymbols, e.g. public int i;

Meta