this.Location = location;
}
}
-
+
class BuilderLocationStack : Stack
{
public override void Push (object o)
bool inScript, javascript;
ILocation location;
bool isApplication;
+ StringBuilder tagInnerText = new StringBuilder ();
static Hashtable emptyHash = new Hashtable ();
public AspGenerator (TemplateParser tparser)
if (tparser.DefaultDirectiveName == "application" && t.Trim () != "")
throw new ParseException (location, "Content not valid for application file.");
- stack.Builder.AppendLiteralString (t);
+ ControlBuilder current = stack.Builder;
+ current.AppendLiteralString (t);
+ if (current.NeedsTagInnerText ()) {
+ tagInnerText.Append (t);
+ }
}
bool ProcessTag (string tagid, TagAttributes atts, TagType tagtype)
// if (current is TemplateBuilder)
// pop from the id list
+ if (current.NeedsTagInnerText ()) {
+ try {
+ current.SetTagInnerText (tagInnerText.ToString ());
+ } catch (Exception e) {
+ throw new ParseException (current.location, e.Message, e);
+ }
+
+ tagInnerText.Length = 0;
+ }
+
current.CloseControl ();
stack.Pop ();
stack.Builder.AppendSubBuilder (current);
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * AspGenerator.cs: handle builders that need to process inner text
+ with tags.
+
+ * Location.cs: added setters for the properties.
+
2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* AspGenerator.cs: the path for file was treated as virtual, but it's
public int BeginLine {
get { return beginLine; }
+ set { beginLine = value; }
}
public int EndLine {
get { return endLine; }
+ set { endLine = value; }
}
public int BeginColumn {
get { return beginColumn; }
+ set { beginColumn = value; }
}
public int EndColumn {
get { return endColumn; }
+ set { endColumn = value; }
}
public string PlainText {
get { return plainText; }
+ set { plainText = value; }
}
}
}