FWIW, I think I will also want to add another state that indicates that the
template variable comprises the entire attribute, for URLs (i.e. <img
src="{0}">, but not <img src={0}/{1}">).  So there will be at least one more
state coming.

On Tue, Mar 29, 2011 at 11:37, Christoph Kern <[email protected]> wrote:

> I could do that. One concern I have though with this approach is that the
> state exposed in HtmlContext would get more complicated.  Right now, code
> using the parser can simply do a switch statement over the contexts (see
> SafeHtmlTemplatesImplMethodCreator#emitParameterExpression); if we make the
> state "multi-dimensional", client code would likely get more complicated.
>
> What do you think?
>
>
> On Tue, Mar 29, 2011 at 11:26, <[email protected]> wrote:
>
>> Knowing that you are at the start of a context type seems generally
>> useful for all context types, including TEXT/ATTRIBUTE/URL (we already
>> have URL_START).
>>
>> Instead of adding CSS_ATTRIBUTE_START, would it be better to add
>> HtmlContext#isStart(), or event HtmlContext#getValueIndex()?
>>
>>
>> http://gwt-code-reviews.appspot.com/1392801/
>>
>
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to