[stringtemplate-interest] File based templates and maps.
Caleb Lyness
caleb.lyness at ezswitch.net
Wed Oct 18 17:16:32 PDT 2006
Hi,
I have been trying to use a map for file based templates. So far no
luck. Is this actually
possible or have I missed the point. I have tried too many combination
to list them here, so
I just list the last thing I tried:
hash map defined in reason.st:
---
$[
"1":"reason for 1",
"2":"reason for 2",
"D":"reason for D",
default : "unknown reason"
]$
---
Now this would make some sense, no?
Now I would refer to $reason.(code)$ in another .st file.
But It does now work...
I did try this syntax (as found on the wiki)
test.st:
----
typeInitMap ::= [
"int":"0",
"long":"1",
default:"null"
]
---
but made no progress. If used this syntax how would I refer to the map?
perhaps: $test.typeInitMap.(type)$ or $test().typeInitMap.int$
Perhaps there is another way to achieve the same thing that I have missed?
I very new to ST. Thanks for the help/advise.
Cheers
Caleb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20061019/e06346a9/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20061019/e06346a9/attachment.bin
More information about the stringtemplate-interest
mailing list