Author: marek
Date: 2007-02-26 17:09:08 -0500 (Mon, 26 Feb 2007)
New Revision: 73447

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/cs-parser.jay
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/cs-parser.jay
   trunk/mcs/mcs/expression.cs
Log:
2007-02-26  Marek Safar  <[EMAIL PROTECTED]>

        * cs-parser.jay, expression.cs: Compile empty __arglist correctly.


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2007-02-26 21:17:29 UTC (rev 73446)
+++ trunk/mcs/gmcs/ChangeLog    2007-02-26 22:09:08 UTC (rev 73447)
@@ -1,3 +1,7 @@
+2007-02-26  Marek Safar  <[EMAIL PROTECTED]>
+
+       * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
+
 2007-02-20  Marek Safar  <[EMAIL PROTECTED]>
 
        A fix for bug #80650

Modified: trunk/mcs/gmcs/cs-parser.jay
===================================================================
--- trunk/mcs/gmcs/cs-parser.jay        2007-02-26 21:17:29 UTC (rev 73446)
+++ trunk/mcs/gmcs/cs-parser.jay        2007-02-26 22:09:08 UTC (rev 73447)
@@ -3214,6 +3214,10 @@
                Expression expr = new Arglist (args, (Location) $1);
                $$ = new Argument (expr, Argument.AType.Expression);
          }
+       | ARGLIST OPEN_PARENS CLOSE_PARENS
+         {
+               $$ = new Argument (new Arglist ((Location) $1), 
Argument.AType.Expression);
+         }       
        | ARGLIST
          {
                $$ = new Argument (new ArglistAccess ((Location) $1), 
Argument.AType.ArgList);

Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2007-02-26 21:17:29 UTC (rev 73446)
+++ trunk/mcs/mcs/ChangeLog     2007-02-26 22:09:08 UTC (rev 73447)
@@ -1,3 +1,7 @@
+2007-02-26  Marek Safar  <[EMAIL PROTECTED]>
+
+       * cs-parser.jay, expression.cs: Compile empty __arglist correctly.
+
 2007-02-25  Marek Safar  <[EMAIL PROTECTED]>
 
        * attribute.cs: Replaced DefinePInvoke in favor of S.R.E implementation

Modified: trunk/mcs/mcs/cs-parser.jay
===================================================================
--- trunk/mcs/mcs/cs-parser.jay 2007-02-26 21:17:29 UTC (rev 73446)
+++ trunk/mcs/mcs/cs-parser.jay 2007-02-26 22:09:08 UTC (rev 73447)
@@ -2968,6 +2968,10 @@
                Expression expr = new Arglist (args, (Location) $1);
                $$ = new Argument (expr, Argument.AType.Expression);
          }
+       | ARGLIST OPEN_PARENS CLOSE_PARENS
+         {
+               $$ = new Argument (new Arglist ((Location) $1), 
Argument.AType.Expression);
+         }       
        | ARGLIST
          {
                $$ = new Argument (new ArglistAccess ((Location) $1), 
Argument.AType.ArgList);

Modified: trunk/mcs/mcs/expression.cs
===================================================================
--- trunk/mcs/mcs/expression.cs 2007-02-26 21:17:29 UTC (rev 73446)
+++ trunk/mcs/mcs/expression.cs 2007-02-26 22:09:08 UTC (rev 73447)
@@ -3865,6 +3865,8 @@
                        ArgList
                };
 
+               public static readonly Argument[] Empty = new Argument [0];
+
                public readonly AType ArgType;
                public Expression Expr;
                
@@ -6329,6 +6331,11 @@
        {
                public Argument[] Arguments;
 
+               public Arglist (Location loc)
+                       : this (Argument.Empty, loc)
+               {
+               }
+
                public Arglist (Argument[] args, Location l)
                {
                        Arguments = args;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to