| language_decl\r
;\r
\r
-customattr_decl : D_CUSTOM custom_type\r
+customattr_decl\r
+ : D_CUSTOM customattr_owner_type_opt custom_type\r
{\r
- $$ = new CustomAttr ((BaseMethodRef) $2, null);\r
+ $$ = new CustomAttr ((BaseMethodRef) $3, null);\r
}\r
- | D_CUSTOM custom_type ASSIGN comp_qstring\r
- | D_CUSTOM custom_type ASSIGN bytes_list\r
+ | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN comp_qstring\r
+ | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN bytes_list\r
{\r
- $$ = new CustomAttr ((BaseMethodRef) $2, new ByteArrConst ((byte[]) $4));\r
+ $$ = new CustomAttr ((BaseMethodRef) $3, new ByteArrConst ((byte[]) $5));\r
}\r
- | D_CUSTOM custom_type ASSIGN OPEN_BRACE customattr_values CLOSE_BRACE\r
+ | D_CUSTOM customattr_owner_type_opt custom_type ASSIGN OPEN_BRACE customattr_values CLOSE_BRACE\r
{\r
- $$ = new CustomAttr ((BaseMethodRef) $2, (PEAPI.Constant) $5);\r
+ $$ = new CustomAttr ((BaseMethodRef) $3, (PEAPI.Constant) $6);\r
}\r
- | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type\r
- | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type ASSIGN comp_qstring\r
- | D_CUSTOM OPEN_PARENS owner_type CLOSE_PARENS custom_type ASSIGN bytes_list\r
;\r
\r
+// TODO: unused for now\r
+customattr_owner_type_opt\r
+ : /* empty */\r
+ | OPEN_PARENS type CLOSE_PARENS\r
+ ;\r
\r
customattr_values\r
: /* empty */\r
;\r
\r
customattr_ctor_args\r
- : field_init_primitive\r
- | customattr_ctor_args field_init_primitive\r
+ : customattr_ctor_arg\r
+ | customattr_ctor_args customattr_ctor_arg\r
{\r
var l = $1 as List<DataConstant>;\r
if (l == null) {\r
}\r
;\r
\r
+customattr_ctor_arg\r
+ : field_init_primitive\r
+ | K_TYPE OPEN_PARENS type CLOSE_PARENS\r
+ {\r
+ $$ = new StringConst (((TypeRef) $3).FullName);\r
+ }\r
+ ;\r
+\r
\r
custom_type : call_conv type type_spec DOUBLE_COLON method_name OPEN_PARENS type_list CLOSE_PARENS\r
{\r