C++: Support attribute arguments that are expressions

This commit is contained in:
Jeroen Ketema
2023-12-22 20:40:47 +01:00
parent bbe3269b8c
commit ad2fb7c6d5
10 changed files with 9728 additions and 683 deletions

View File

@@ -937,6 +937,7 @@ case @attribute_arg.kind of
| 2 = @attribute_arg_constant
| 3 = @attribute_arg_type
| 4 = @attribute_arg_constant_expr
| 5 = @attribute_arg_expr
;
attribute_arg_value(
@@ -951,6 +952,10 @@ attribute_arg_constant(
unique int arg: @attribute_arg ref,
int constant: @expr ref
)
attribute_arg_expr(
unique int arg: @attribute_arg ref,
int expr: @expr ref
)
attribute_arg_name(
unique int arg: @attribute_arg ref,
string name: string ref