D-Programming-Language/dmd — pull request #3947 by IgorStepanov (2014-09-04 23:20:59+00:00)
Title: [enh] implement UDA for module declaration

This PR introduce UDA for module declaration.
Usage:
```
///test.d
@UDA(42) module test;
struct UDA
{
int a;
}

pragma(msg, __traits(getAttributes, test)); //prints "tuple(UDA(42))"

///test2.d
import test;
pragma(msg, __traits(getAttributes, test)); //prints "tuple(UDA(42))"
```
In other words, when __traits(getAttributes, ...) is applied to import statement, it returns attributes of corresponding module.

Mulitple UDAs are allowed:
```
@UDA(42) @UDA(24) module test; //OK
```
```
@(UDA(42), UDA(24)) module test; //OK
```
UDAs can be mixed with `deprecated` attribute:
```
@UDA(42) deprecated module test; //OK
```
```
deprecated @UDA(42) module test; //OK
```