Author: marek
Date: 2006-12-11 14:05:50 -0500 (Mon, 11 Dec 2006)
New Revision: 69350
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/cs-tokenizer.cs
Log:
2006-12-11 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #74939
* cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
directives handling.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2006-12-11 19:00:31 UTC (rev 69349)
+++ trunk/mcs/mcs/ChangeLog 2006-12-11 19:05:50 UTC (rev 69350)
@@ -1,3 +1,9 @@
+2006-12-11 Marek Safar <[EMAIL PROTECTED]>
+
+ A fix for bug #74939
+ * cs-tokenizer.cs (is_punct): We cannot simply disable preprocessor
+ directives handling.
+
2006-12-10 Marek Safar <[EMAIL PROTECTED]>
A fix for bugs #80093, and #75984
Modified: trunk/mcs/mcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/mcs/cs-tokenizer.cs 2006-12-11 19:00:31 UTC (rev 69349)
+++ trunk/mcs/mcs/cs-tokenizer.cs 2006-12-11 19:05:50 UTC (rev 69350)
@@ -654,11 +654,16 @@
PushPosition ();
- // disable preprocessing directives when peeking
- process_directives = false;
+ // Backup preprocessor flow data because we'll
restore cursor possition
+ Stack ifstack_backup = null;
+ if (ifstack != null && ifstack.Count != 0)
+ ifstack_backup = (Stack)ifstack.Clone
();
+
int new_token = xtoken ();
- process_directives = true;
+ if (ifstack_backup != null)
+ ifstack = ifstack_backup;
+
PopPosition ();
if (new_token == Token.OPEN_PARENS)
@@ -1865,11 +1870,6 @@
}
//
- // Set to false to stop handling preprocesser directives
- //
- bool process_directives = true;
-
- //
// if true, then the code continues processing the code
// if false, the code stays in a loop until another directive is
// reached.
@@ -2357,10 +2357,6 @@
}
if (c == '#') {
- // return NONE if we're not processing
directives (during token peeks)
- if (!process_directives)
- return Token.NONE;
-
if (tokens_seen || comments_seen) {
Eror_WrongPreprocessorLocation
();
return Token.ERROR;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches