Reputation: 205
When using StringTemplate 4.0.2 the following object construction:
ST st = new ST("@myToken@", '@', '@');
produces the exception:
1:8: '@' came as a complete surprise to me
Exception in thread "main" org.stringtemplate.v4.compiler.STException
at org.stringtemplate.v4.compiler.Compiler.reportMessageAndThrowSTException(Compiler.java:213)
at org.stringtemplate.v4.compiler.Compiler.compile(Compiler.java:143)
at org.stringtemplate.v4.STGroup.compile(STGroup.java:427)
at org.stringtemplate.v4.ST.<init>(ST.java:142)
at org.stringtemplate.v4.ST.<init>(ST.java:136)
Is there some special way to use the '@' character as a custom delimiter or is it simply not allowed?
Upvotes: 3
Views: 1059