Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.attribsem
Does semantic analysis for 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)
Authors:
License:
Source attrib.d
Documentation https://dlang.org/phobos/dmd_attribsem.html
- int
foreachUda
(Dsymbolsym
, Scope*sc
, int delegate(Expression)dg
); - Iterates the UDAs attached to the given symbol.Parameters:
Dsymbol sym
the symbol to get the UDAs from Scope* sc
scope to use for semantic analysis of UDAs int delegate(Expression) dg
called once for each UDA Returns:Ifdg
returns != 0, stops the iteration and returns that value. Otherwise, returns 0.
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on Sat Sep 7 11:26:04 2024