%{\r
-// Mono::ILASM::ILParser\r
//\r
+// Mono::ILASM::ILParser\r
+// \r
// (C) Sergey Chaban (serge@wildwestsoftware.com)\r
+// (C) 2003 Jackson Harper, All rights reserved\r
+//\r
\r
using PEAPI;\r
using System;\r
codegen.BeginTypeDef ((TypeAttr) $2, (string) $3, \r
$5 as IClassRef, $6 as ArrayList, null);\r
\r
- // Lets not worry about generics for now :p\r
+ /*\r
if ($4 != null) {\r
ArrayList typars_list = (ArrayList) $4;\r
foreach (DictionaryEntry entry in typars_list) {\r
- string name = (string) entry.Key;\r
+ ITypeRef constraint = (ITypeRef) entry.Key;\r
string id = (string) entry.Value;\r
- codegen.CurrentTypeDef.AddGenericParam (name, id);\r
+ codegen.CurrentTypeDef.AddGenericParam (constraint, id);\r
}\r
}\r
- \r
+ */\r
}\r
;\r
\r
;\r
\r
\r
-formal_typar : id\r
+formal_typar : type\r
{\r
$$ = new DictionaryEntry ($1, null);\r
}\r
- | id id\r
+ | type id\r
{\r
$$ = new DictionaryEntry ($1, $2);\r
}\r
}\r
| type K_MODREQ OPEN_PARENS class_ref CLOSE_PARENS\r
{\r
- /*\r
ITypeRef base_type = (ITypeRef) $1;\r
- ITypeRef class_ref = (ITypeRef) $4;\r
-\r
- $$ = new CustomModifiedType (base_type.Type,\r
- CustomModifier.modreq, (Class) class_ref.Type);\r
- */\r
+ IClassRef class_ref = (IClassRef) $4;\r
+ base_type.MakeCustomModified (codegen,\r
+ CustomModifier.modopt, class_ref); \r
}\r
| type K_MODOPT OPEN_PARENS class_ref CLOSE_PARENS\r
{\r
- /*\r
- TypeRef base_type = (TypeRef) $1;\r
- TypeRef class_ref = (TypeRef) $4;\r
-\r
- $$ = new CustomModifiedType (base_type.Type,\r
- CustomModifier.modopt, (Class) class_ref.Type);\r
- */\r
+ ITypeRef base_type = (ITypeRef) $1;\r
+ IClassRef class_ref = (IClassRef) $4;\r
+ base_type.MakeCustomModified (codegen,\r
+ CustomModifier.modopt, class_ref); \r
}\r
| K_METHOD call_conv type STAR OPEN_PARENS sig_args CLOSE_PARENS\r
| K_TYPEDREF\r