data Attr
An attribute @name(args).
Example:
use std.comptime { Decl, warn }
comptime fn no_deprecated(d: Decl) {
for a in d.attrs {
if a.name == "deprecated" {
warn(a.span, "{d.name} is deprecated")
}
}
}pub(api) data AttrС версии. 1.0.0-beta
Поля
pub(api) name: str | Name of the attribute without |
pub(api) args: List<AttrArg> | The arguments in the order written. |
pub(api) span: Span | Where the attribute is written. |
Определено в: std/comptime/comptime.oxl:95