[stringtemplate-interest] Copyright template - was Re: ST Group File comments
Zenaan Harkness
zen at freedbms.net
Tue Sep 19 05:47:46 PDT 2006
On Tue, Sep 19, 2006 at 12:53:36PM +1000, Zenaan Harkness wrote:
> I would like to be able to add comments to my group files, just
> above each template in the group, somewhat akin to Java's
> class-level comments.
>
> Would this be easy to add?
>
> If so, can someone point me in the general direction of where to
> experiment within the source?
How does this look for copyright template in a group file:
copyright(prefix) ::= <<
<prefix><[
"Copyright (C) 2006 NonProfit Organisation Name.",
"Contact: zen at freedbms.net"
]; separator="\n"+(prefix)>
>>
And then later, its use somewhere in another template, with a
Java class comment style prefix:
<copyright(prefix="// ")>
This serves the purpose of having a copyright template, and
documents this particular group file by virtue of having the
copyright template at the top of the group file, but other sub-
group files which reference the copyright template won't have that
luxury, and I would like to include a copyright at the top of each
file. Thus my original post.
Thoughts?
Zen
--
Free Australia - www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list