From 34a5f961ca86c84dbe1ecd96e673f0dce6269db2 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Fri, 20 Jun 2008 10:23:44 +0000 Subject: [PATCH] Revert r106068 and reopen bug #400807. The revision broke more than it fixed and there exists a workaround for the bug metioned before svn path=/trunk/mcs/; revision=106297 --- .../System.Web/System.Web.Compilation/AspParser.cs | 12 +++--------- .../System.Web.Compilation/AspTokenizer.cs | 6 ++---- .../System.Web/System.Web.Compilation/ChangeLog | 10 ---------- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs index 28a71b11014..004d9732ee3 100644 --- a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs +++ b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs @@ -423,8 +423,7 @@ namespace System.Web.Compilation i = 0; } - if (token < Token.FIRST_TOKEN || token > Token.LAST_TOKEN) - vb_text.Append ((char) token); + vb_text.Append ((char) token); token = tokenizer.get_token (); } @@ -470,7 +469,7 @@ namespace System.Web.Compilation return; } - + if (Eat (Token.DOUBLEDASH)) { tokenizer.ExpectAttrValue = old; tokenizer.Verbatim = true; @@ -488,13 +487,8 @@ namespace System.Web.Compilation varname = Eat ('='); databinding = !varname && Eat ('#'); - if (Eat (Token.IDENTIFIER)) - inside_tags = tokenizer.Value; - else - inside_tags = String.Empty; - tokenizer.Verbatim = true; - inside_tags += GetVerbatim (tokenizer.get_token (), "%>"); + inside_tags = GetVerbatim (tokenizer.get_token (), "%>"); tokenizer.Verbatim = false; id = inside_tags; attributes = null; diff --git a/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs b/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs index 276907ce209..b915e7fd181 100644 --- a/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs +++ b/mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs @@ -37,7 +37,6 @@ namespace System.Web.Compilation { class Token { - public const int FIRST_TOKEN = 0x0200000; public const int EOF = 0x0200000; public const int IDENTIFIER = 0x0200001; public const int DIRECTIVE = 0x0200002; @@ -45,7 +44,6 @@ namespace System.Web.Compilation public const int TEXT = 0x0200004; public const int DOUBLEDASH = 0x0200005; public const int CLOSING = 0x0200006; - public const int LAST_TOKEN = 0x0200006; } class AspTokenizer @@ -94,7 +92,7 @@ namespace System.Web.Compilation { if (hasPutBack){ hasPutBack = false; - position += Value.Length; + position += Value.Length; return current_token; } @@ -269,7 +267,7 @@ namespace System.Web.Compilation if (current_token == '@' && Directive.IsDirective (sb.ToString ())) return Token.DIRECTIVE; - + return Token.IDENTIFIER; } diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog index 77a5acac33e..643c5928435 100644 --- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog +++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog @@ -3,16 +3,6 @@ * TemplateControlCompiler.cs: AddChildCall properly processes the PartialCachingAttribute now. -2008-06-17 Marek Habersack - - * AspTokenizer.cs: Added FIRST_TOKEN and LAST_TOKEN symbols to the - internal Token class. - - * AspParser.cs: GetServerTag must use parsed identifiers when - gathering verbatim code strings. - GetVerbatim must not add to the text tokens which aren't - characters. Fixes bug #400807 - 2008-06-11 Marek Habersack * BuildManager.cs: if an error occurs while assigning the -- 2.25.1