Author: rafael
Date: 2005-07-13 19:05:51 -0400 (Wed, 13 Jul 2005)
New Revision: 47289

Modified:
   trunk/mcs/mbas/ChangeLog
   trunk/mcs/mbas/block.cs
   trunk/mcs/mbas/mb-parser.jay
Log:
2005-07-13 Maverson Eduardo Schulze Rosa <[EMAIL PROTECTED]>
        * mb-parser.jay:
        * block.cs: Support and successfully find goto target labels
        declared out of block that contains the goto statement.



Modified: trunk/mcs/mbas/ChangeLog
===================================================================
--- trunk/mcs/mbas/ChangeLog    2005-07-13 23:02:10 UTC (rev 47288)
+++ trunk/mcs/mbas/ChangeLog    2005-07-13 23:05:51 UTC (rev 47289)
@@ -1,3 +1,8 @@
+2005-07-13 Maverson Eduardo Schulze Rosa <[EMAIL PROTECTED]>
+       * mb-parser.jay:
+       * block.cs: Support and successfully find goto target labels
+       declared out of block that contains the goto statement.
+
 2005-07-13 Rafael Teixeira <[EMAIL PROTECTED]>
        *statement.cs: extract class Block into new source block.cs
        *mbas.exe.sources: added newly extracted block.cs

Modified: trunk/mcs/mbas/block.cs
===================================================================
--- trunk/mcs/mbas/block.cs     2005-07-13 23:02:10 UTC (rev 47288)
+++ trunk/mcs/mbas/block.cs     2005-07-13 23:05:51 UTC (rev 47289)
@@ -257,8 +257,8 @@
                                return null;
 
                        foreach (Block child in children) {
-                               if (!child.Implicit)
-                                       continue;
+                       //      if (!child.Implicit)
+                       //              continue;
 
                                s = child.LookupLabel (name);
                                if (s != null) 

Modified: trunk/mcs/mbas/mb-parser.jay
===================================================================
--- trunk/mcs/mbas/mb-parser.jay        2005-07-13 23:02:10 UTC (rev 47288)
+++ trunk/mcs/mbas/mb-parser.jay        2005-07-13 23:05:51 UTC (rev 47289)
@@ -2893,7 +2893,14 @@
 goto_statement
        : GOTO label_name  
          {
+               Block block = current_block;
+         
+               while( current_block.Parent != null )
+                       current_block = current_block.Parent;
+
                $$ = new Goto (current_block, (string) $2, lexer.Location);
+
+               current_block = block;
          }
        ;
        

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

Reply via email to