Author: raja
Date: 2005-06-16 05:25:34 -0400 (Thu, 16 Jun 2005)
New Revision: 46077

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/cs-tokenizer.cs
Log:
Revert r46073.  It caused corlib_test.dll compilation to fail.


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-06-16 03:38:55 UTC (rev 46076)
+++ trunk/mcs/mcs/ChangeLog     2005-06-16 09:25:34 UTC (rev 46077)
@@ -2,9 +2,10 @@
 
        * cs-tokenizer.cs (process_directives): New flag for controlling
        the processing of preprocessor directives.
-       (handle_preprocessing_directive): Exit early when not processing
-       directives. This avoids unnecessary processing during the token
-       peek in is_punct().
+       (x_token): After seeing a '#', return Token.NONE instead of going
+       to handle_preprocessing_directive() when not processing
+       directives. This avoids unnecessary processing during the token peek in
+       is_punct().
 
        This fixes #74939.
 

Modified: trunk/mcs/mcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/mcs/cs-tokenizer.cs       2005-06-16 03:38:55 UTC (rev 46076)
+++ trunk/mcs/mcs/cs-tokenizer.cs       2005-06-16 09:25:34 UTC (rev 46077)
@@ -1558,9 +1558,6 @@
                //
                bool handle_preprocessing_directive (bool caller_is_taking)
                {
-                       if (!process_directives)
-                               return true;
-
                        string cmd, arg;
                        bool region_directive = false;
 
@@ -2060,6 +2057,9 @@
                                // FIXME: In C# the '#' is not limited to appear
                                // on the first column.
                                if (c == '#') {
+                                       // return NONE if we're not processing 
directives (during token peeks)
+                                       if (!process_directives)
+                                               return Token.NONE;
 
                                        bool cont = true;
                                        if (tokens_seen || comments_seen) {

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

Reply via email to