@@ -1113,7 +1113,7 @@ $(H2 $(LNAME2 uda, User-Defined Attributes))
1113
1113
1114
1114
$(GRAMMAR
1115
1115
$(GNAME UserDefinedAttribute):
1116
- $(D @ $(LPAREN)) $(GLINK2 expression , TemplateArgumentList) $(D $(RPAREN))
1116
+ $(D @ $(LPAREN)) $(GLINK2 template , TemplateArgumentList) $(D $(RPAREN))
1117
1117
$(D @) $(GLINK2 template, TemplateSingleArgument)
1118
1118
$(D @) $(GLINK_LEX Identifier) $(D $(LPAREN)) $(GLINK2 expression, NamedArgumentList)$(OPT) $(D $(RPAREN))
1119
1119
$(D @) $(GLINK2 template, TemplateInstance)
@@ -1127,14 +1127,14 @@ $(GNAME UserDefinedAttribute):
1127
1127
)
1128
1128
1129
1129
A user-defined attribute is defined using:
1130
- * Compile-time expressions
1131
- * A named manifest constant
1132
- * A type name
1133
- * A type to instantiate using a compile-time argument list
1130
+ * A list of one or more $(GLINK2 template, TemplateArgument)s
1131
+ * A compile-time expression (matching the above grammar)
1132
+ * A symbol identifier
1133
+ * An expression (matching the above grammar) to invoke with an argument list at compile-time
1134
1134
1135
1135
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
1136
1136
---
1137
- @(3) int a; // value argument
1137
+ @3 int a; // value attribute
1138
1138
@("string", 7) int b; // multiple values
1139
1139
1140
1140
// using compile-time constant
@@ -1148,8 +1148,8 @@ struct Bar
1148
1148
{
1149
1149
int x;
1150
1150
}
1151
- @Bar() int d; // type instance
1152
- @Bar(3) int e; // type instance using initializer
1151
+ @Bar() int d; // type instance attribute
1152
+ @Bar(3) int e; // type instance attribute using initializer
1153
1153
---
1154
1154
)
1155
1155
$(P For `e`, the attribute is an instance of struct `Bar` which is
@@ -1232,7 +1232,7 @@ $(H3 $(LNAME2 uda-usage, Usage))
1232
1232
)
1233
1233
1234
1234
$(P
1235
- Whether the attributes are values or types is up to the user, and whether later
1235
+ Whether the attributes are values or symbols is up to the user, and whether later
1236
1236
attributes accumulate or override earlier ones is also up to how the user
1237
1237
interprets them.
1238
1238
)
0 commit comments