Explorar el Código

2003-05-22 Gonzalo Paniagua Javier <[email protected]>

	* AspParser.cs:
	* AspTokenizer.cs: fixed bugs #43206 and #43371.

svn path=/trunk/mcs/; revision=14781
Gonzalo Paniagua Javier hace 22 años
padre
commit
bb14252e09

+ 2 - 4
mcs/class/System.Web/System.Web.Compilation/AspParser.cs

@@ -254,6 +254,7 @@ namespace System.Web.Compilation
 				break;
 			default:
 				tagtype = TagType.Text;
+				tokenizer.InTag = false;
 				id = "<" + tokenizer.Value;
 				break;
 			}
@@ -266,7 +267,7 @@ namespace System.Web.Compilation
 			string id;
 
 			attributes = new TagAttributes ();
-			while ((token = tokenizer.get_token ())  != Token.EOF){
+			while ((token = tokenizer.get_token ()) != Token.EOF){
 				if (token != Token.IDENTIFIER)
 					break;
 				id = tokenizer.Value;
@@ -285,9 +286,6 @@ namespace System.Web.Compilation
 			}
 
 			tokenizer.put_back ();
-			if (attributes.Count == 0)
-				return null;
-
 			return attributes;
 		}
 

+ 8 - 1
mcs/class/System.Web/System.Web.Compilation/AspTokenizer.cs

@@ -215,8 +215,10 @@ namespace System.Web.Compilation
 					return Token.IDENTIFIER;
 				}
 
-				if (!Char.IsWhiteSpace ((char) c))
+				if (!Char.IsWhiteSpace ((char) c)) {
+					sb.Append  ((char) c);
 					return c;
+				}
 			}
 
 			return Token.EOF;
@@ -233,6 +235,11 @@ namespace System.Web.Compilation
 			}
 		}
 
+		public bool InTag {
+			get { return inTag; }
+			set { inTag = value; }
+		}
+		
 		public int BeginLine {
 			get { return begline; }
 		}

+ 5 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -1,3 +1,8 @@
+2003-05-22  Gonzalo Paniagua Javier <[email protected]>
+
+	* AspParser.cs:
+	* AspTokenizer.cs: fixed bugs #43206 and #43371.
+
 2003-05-10  Gonzalo Paniagua Javier <[email protected]>
 
 	* TemplateControlCompiler.cs: duh! Generate SupportAutoEvents instead