Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/ilasm
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2015-06-19 12:46:01 +0300
committerMarek Safar <marek.safar@gmail.com>2015-06-19 12:46:55 +0300
commitfe0c96790bf0db36b374e2ed96916b0c524702a6 (patch)
tree27805c25e4a99ca173a3359b789f4e4f72fbdb30 /mcs/ilasm
parent106e71e2c8902449bcf6657776523c6c4644519d (diff)
[ilasm] Add support for multiple custom type modifiers attached to single type
Diffstat (limited to 'mcs/ilasm')
-rw-r--r--mcs/ilasm/parser/ILParser.jay18
1 files changed, 8 insertions, 10 deletions
diff --git a/mcs/ilasm/parser/ILParser.jay b/mcs/ilasm/parser/ILParser.jay
index 4cd03495ef3..7e69c763418 100644
--- a/mcs/ilasm/parser/ILParser.jay
+++ b/mcs/ilasm/parser/ILParser.jay
@@ -921,7 +921,7 @@ class_decl : method_all
type : generic_class_ref
{
- $$ = $1;
+ $$ = GetTypeRef ((BaseTypeRef) $1);
}
| K_OBJECT
{
@@ -952,38 +952,38 @@ type : generic_class_ref
}
| type OPEN_BRACKET CLOSE_BRACKET
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
base_type.MakeArray ();
$$ = base_type;
}
| type OPEN_BRACKET bounds CLOSE_BRACKET
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
ArrayList bound_list = (ArrayList) $3;
base_type.MakeBoundArray (bound_list);
$$ = base_type;
}
| type AMPERSAND
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
base_type.MakeManagedPointer ();
$$ = base_type;
}
| type STAR
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
base_type.MakeUnmanagedPointer ();
$$ = base_type;
}
| type K_PINNED
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
base_type.MakePinned ();
$$ = base_type;
}
| type K_MODREQ OPEN_PARENS custom_modifier_type CLOSE_PARENS
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
BaseTypeRef class_ref = (BaseTypeRef) $4;
base_type.MakeCustomModified (codegen,
CustomModifier.modreq, class_ref);
@@ -991,7 +991,7 @@ type : generic_class_ref
}
| type K_MODOPT OPEN_PARENS custom_modifier_type CLOSE_PARENS
{
- BaseTypeRef base_type = GetTypeRef ((BaseTypeRef) $1);
+ BaseTypeRef base_type = (BaseTypeRef) $1;
BaseTypeRef class_ref = (BaseTypeRef) $4;
base_type.MakeCustomModified (codegen,
CustomModifier.modopt, class_ref);
@@ -1004,8 +1004,6 @@ type : generic_class_ref
| primitive_type
;
- ;
-
primitive_type : K_INT8
{
$$ = new PrimitiveTypeRef (PrimitiveType.Int8, "System.SByte");