[stringtemplate-interest] sending static templates

Terence Parr parrt at cs.usfca.edu
Sun Jan 22 13:09:50 PST 2006


On Jan 18, 2006, at 11:45 PM, David Moshal wrote:

> Ter -
> No, < won't work either.
> Yes, I suppose it is a String data object once it's in memory.
> I could always write my own file resource loading and cacheing  
> code. I realize that's fairly trivial, but it seems a little  
> redundant. It would be very convenient if I could use ST to load a  
> file, without validating or parsing it.

I suppose, though it wouldn't be a template, right? ;)

> I have another (possibly related) question:
> Is there a way of marking a section of a template as a comment,
> ie: <!-- coment --> , which is ignored.

Yes.  Use that. :)  or $!...!$

> Reason I say possibly related, is that I could imagine that a  
> mechanism for marking a section as a 'raw' (ie dont't parse or  
> validate) would solve the first question:
> ie <raw> $$$<<<$$$ </raw>

I suppose, yes.  Perhaps a raw or verbatim section would be useful.

> given that you use the control block <\n>, don't you have a  
> mechanism in place for processing other control blocks, such as  
> comment/ignore and raw?

Yep...all but the raw.

Ter


More information about the stringtemplate-interest mailing list